Request is not going through Fiddler when client sends wrong content-length header in request

64 views
Skip to first unread message

Suresh Reddy

unread,
Jun 27, 2014, 6:03:50 AM6/27/14
to httpf...@googlegroups.com
Hi,

I have a client and server, both are written in Java. Client is communicating with server using HTTP protocol, but one of the request that client sending to the server has wrong content-length header. When I put fiddler in between them fiddler is waiting to read complete request since content-length header mentioned as 256 but it is not send any content length.

Problematic request:

POST /api/test?s=1&p=3 HTTP/1.1\r\n
Host: 127.0.0.1\r\n
Connection: close\r\n
Content-Length: 256\r\n
X-Version: 2\r\n\r\n


Is there anyway that I can tell fiddler to do not read any content for the above request?

Thanks,
Suresh

EricLaw

unread,
Jun 27, 2014, 6:17:00 PM6/27/14
to httpf...@googlegroups.com
Such a request is badly malformed and the client should be fixed. Hacking Fiddler to enable the illegal request isn't really the right way to fix it.

Having said that, if you click Rules > Customize Rules, scroll to OnPeekAtRequest headers, you can overwrite the illegal Content-Length header with a valid value (e.g. Content-Length: 0) such that the request is no longer malformed.
Reply all
Reply to author
Forward
0 new messages