作amp服务时,各类请求经过nginx打到resin服务器上,有个接口是抓取woff字体java
woff tff字体获取后,提示以下错误,nginx
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for '
'"$upstream_addr" "$upstream_status" "$upstream_response_time" "$request_time"';web
打印出来的内容证实,同时发起的屡次请求,只有几毫秒的upstream_response_time,而单独访问时则200+毫秒spring
一开始觉得是并发问题,可是量不大,并且用到了epoll服务器
因此,直接查看web.xml中的fiter,对CharacterEncodingFilter进行debug,抓取到以下异常并发
org.springframework.web.util.NestedServletException: Request processing failed;
nested exception is java.lang.IllegalStateException: Could not get HttpServletRequest URI: Illegal character in hostname at index 10: http: //amp_server:80/reventondc/amp/r/f.kinja-static.com/assets/fonts/elizabeth-serif/elizabethserif-bold-webfont.woff2?09162015app
发现是下划线的问题,由于是测试环境,没有用$host,直接传过来了upstream的名称,由于带有下划线,因此报错less
后面改为用host,问题解决测试
可是屡次请求有问题,单次请求就能够,初步判断是spring的小bug,回头跟进一下,待续字体