Serving WAP pages from nginx

While serving a lot of WAP / Mobile Based content, nginx is throwing up
a
lot of HTTP 400 errors. Also connection refused upstream is coming a
lot!

2008/07/29 10:43:46 [info] 20025#0: 32822441 client sent invalid header
line: "x-nokia.wia.accept.original:
text/javascript,text/ecmascript,application/x-ja
vascript,
/*,text/x-vCard,text/x-vCalendar,image/gif,image/vnd.wap.wbmp"
while reading client request headers, client: 125.18.235.215, server:
whatever.com, r
equest: “GET /ad/ad_picture/1085/167this.jpg HTTP/1.1”, host: "
www.whatever.com"
2008/07/29 10:43:48 [info] 20025#0: *32822483 client sent invalid
request
while reading client request line, client: 69.64.49.234, server:
whatever.com, reque
st: “GET
/waphandler?cid=14131C047A5041424257475C4657455C8D8F&ua=SPICE-S808%2FWAP+Browser&ip=ip_zest&mt=Insert
relevant metadata here&request=impression HTTP
/1.0”
2008/07/29 10:43:53 [info] 20025#0: *32822606 client sent invalid header
line: “X-Nokia-CONNECTION_MODE: CMODE” while reading client request
headers,
client:
203.145.131.148, server: whatever.com, request: “GET
/ad/ad_picture/1091/top10_216x36.jpg HTTP/1.1”, host: “www.whatever.com
2008/07/29 10:43:53 [info] 20025#0: 32822606 client sent invalid header
line: “X-Nokia-GATEWAY_ID: NWG/4.1/Build104” while reading client
request
headers, c
lient: 203.145.131.148, server: whatever.com, request: “GET
/ad/ad_picture/1091/top10_216x36.jpg HTTP/1.1”, host: “www.whatever.com
2008/07/29 10:43:53 [info] 20025#0: 32822606 client sent invalid header
line: "x-nokia.wia.accept.original:
image/jpeg,
/
,text/x-vCard,text/x-vCalendar,ima
ge/gif,image/vnd.wap.wbmp" while reading client request headers, client:
203.145.131.148, server: whatever.com, request: “GET
/ad/ad_picture/1091/top10_216x36
.jpg HTTP/1.1”, host: “www.whatever.com
2008/07/29 10:43:55 [error] 20025#0: *32822647 connect() failed (111:
Connection refused) while connecting to upstream, client: 67.212.160.90,
server: zestad
z.com, request: “GET
/waphandler?cid=14131C047A504142455844554756465A8F89&ua=Mozilla%2F4.0+%28compatible%3B+MSIE+6.0%3B+Symbian+OS%3B+Nokia+3230%2F5.0604.0%3
B+9399%29+Opera+8.65+%5Ben%5D&ip=117.99.58.93&mt=symbian&request=impression
HTTP/1.0”, upstream: "
http://192.168.1.3:9003/waphandler?cid=14131C047A5041424558
44554756465A8F89&ua=Mozilla%2F4.0+%28compatible%3B+MSIE+6.0%3B+Symbian+OS%3B+Nokia+3230%2F5.0604.0%3B+9399%29+Opera+8.65+%5Ben%5D&ip=
117.99.58.93&mt=symbian&
request=impression", host: “www.whatever.com
2008/07/29 10:43:55 [error] 20025#0: *32822647 connect() failed (111:
Connection refused) while connecting to upstream, client: 67.212.160.90,
server: zestad
z.com, request: “GET
/waphandler?cid=14131C047A504142455844554756465A8F89&ua=Mozilla%2F4.0+%28compatible%3B+MSIE+6.0%3B+Symbian+OS%3B+Nokia+3230%2F5.0604.0%3
B+9399%29+Opera+8.65+%5Ben%5D&ip=117.99.58.93&mt=symbian&request=impression
HTTP/1.0”, upstream: "
http://192.168.1.3:9004/waphandler?cid=14131C047A5041424558
44554756465A8F89&ua=Mozilla%2F4.0+%28compatible%3B+MSIE+6.0%3B+Symbian+OS%3B+Nokia+3230%2F5.0604.0%3B+9399%29+Opera+8.65+%5Ben%5D&ip=
117.99.58.93&mt=symbian&
request=impression", host: “www.whatever.com
2008/07/29 10:44:03 [info] 20025#0: *32822864 client sent invalid header
line: “X-Nokia-CONNECTION_MODE: CMODE” while reading client request
headers,
client:
203.145.134.213, server: whatever.com, request: “GET
/ad/ad_picture/1094/hashar_216x36.jpg HTTP/1.1”, host:
www.whatever.com
2008/07/29 10:44:03 [info] 20025#0: *32822864 client sent invalid header
line: “X-Nokia-GATEWAY_ID: NWG/4.1/Build101” while reading client
request
headers, c
lient: 203.145.134.213, server: whatever.com, request: “GET
/ad/ad_picture/1094/hashar_216x36.jpg HTTP/1.1”, host:
www.whatever.com
2008/07/29 10:44:03 [info] 20025#0: *32822864 client sent invalid header
line: “x-nokia.wia.accept.original:
application/vnd.wap.connectivity-wbxml,applicati
on/vnd.wap.wmlc,application/vnd.wap.wmlscriptc,image/vnd.wap.wbmp,image/gif,image/jpeg,image/png,image/bmp,application/xhtml+xml,application/vnd.wap.xhtml+xm
l,text/html,text/css,application/vnd.wap.mms-message,application/vnd.wap.sic,audio/midi,audio/sp-midi,audio/mid,audio/imelody,text/x-imelody,application/vnd.
oma.drm.message,application/vnd.oma.drm.content,application/vnd.oma.drm.rights+xml,application/vnd.oma.drm.rights+wbxml,text/x-vCard,text/x-vCalendar”
while
reading client request headers, client: 203.145.134.213, server:
whatever.com, request: “GET /ad/ad_picture/1094/hashar_216x36.jpg
HTTP/1.1”,
host: “www.zesta
dz.com
2008/07/29 10:44:06 [info] 20025#0: *32822926 client sent invalid header
line: “X-Nokia-CONNECTION_MODE: TCP” while reading client request
headers,
client: 1
25.18.235.215, server: whatever.com, request: “GET
/ad/ad_picture/1091/top10_216x36.jpg HTTP/1.1”, host: “www.whatever.com
2008/07/29 10:44:06 [info] 20025#0: *32822926 client sent invalid header
line: “X-Nokia-GATEWAY_ID: NWG/4.1/Build104” while reading client
request
headers, c
lient: 125.18.235.215, server: whatever.com, request: “GET
/ad/ad_picture/1091/top10_216x36.jpg HTTP/1.1”, host: “www.whatever.com
2008/07/29 10:44:06 [info] 20025#0: *32822926 client sent invalid header
line: “x-nokia.wia.accept.original:
image/vnd.wap.wbmp,image/gif,image/jpg,image/jpe
g,image/png,image/bmp,image/x-bmp,text/x-vCard,text/x-vCalendar” while
reading client request headers, client: 125.18.235.215, server:
whatever.com,
request:
“GET /ad/ad_picture/1091/top10_216x36.jpg HTTP/1.1”, host:
"www.whatever.com
"
2008/07/29 10:44:06 [info] 20025#0: *32822929 client sent invalid header
line: “X-Nokia-CONNECTION_MODE: TCP” while reading client request
headers,
client: 2
03.145.131.148, server: whatever.com, request: “GET
/ad/ad_picture/1091/top10_216x36.jpg HTTP/1.1”, host: “www.whatever.com
2008/07/29 10:44:06 [info] 20025#0: 32822929 client sent invalid header
line: “X-Nokia-GATEWAY_ID: NWG/4.1/Build104” while reading client
request
headers, c
lient: 203.145.131.148, server: whatever.com, request: “GET
/ad/ad_picture/1091/top10_216x36.jpg HTTP/1.1”, host:
www.whatever.com

Can someone suggest what are these errors and suggest resolution.

Thanks for the replies

Asif

On Tue, Jul 29, 2008 at 02:34:43PM +0530, Asif A. wrote:

Can someone suggest what are these errors and suggest resolution.

what version are you running? i think nginx had troubles with some
mobile phones as they send two Host
headers, the issue got fixed recently.

the stable 0.5.x version

I just realized that they have a newer stable release available. Has
someone
fixed such an issue with this upgrade?

regards

Asif A.

On Tue, Jul 29, 2008 at 05:01:28PM +0530, Asif A. wrote:

I just realized that they have a newer stable release available. Has someone
fixed such an issue with this upgrade?

The upgrade does not resolve the problem.

nginx does not like “.” and “_” in header names:

“x-nokia.wia.accept.original”
“X-Nokia-CONNECTION_MODE”

However, it simply ignores them and logs them at info level.

The request

“GET
/waphandler?cid=14131C047A5041424257475C4657455C8D8F&ua=SPICE-S808%2FWAP+Browser&ip=ip_zest&mt=Insert
relevant metadata here&request=impression HTTP /1.0”

is invalid because is contains unescaped spaces in URI:
“mt=Insert relevant metadata here”

On 7/29/08, Igor S. [email protected] wrote:

The request

“GET /waphandler?cid=14131C047A5041424257475C4657455C8D8F&ua=SPICE-S808%2FWAP+Browser&ip=ip_zest&mt=Insert relevant metadata here&request=impression HTTP /1.0”

is invalid because is contains unescaped spaces in URI:
“mt=Insert relevant metadata here”

will nginx still serve this? in my opinion it should understand the
request and still handle it. we can’t necessarily control the input
but we can control the handling of it…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs