You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Gary Gregory <ga...@gmail.com> on 2018/02/20 19:55:32 UTC
A better message for an "Invalid request line"
Hi All:
I am debugging a use case where my HTTP server receives junk it seems:
org.apache.http.ProtocolException: Invalid request line: 4 ւ
HTTP/1.1 /logon 137.134.250.10 rsmob.rocketsoftware.com ہ
application/json
cache-control no-cache
Postman-Token $8c44259f-5e7c-47eb-ba73-2146e791b82f
PostmanRuntime/7.1.1 */* rsmob.rocketsoftware.com
gzip, deflate 44
at org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractMessageParser.java:209)
~[httpcore-nio-4.4.9.jar:4.4.9]
The square boxes I am seeing are not really helpful. I wonder if we should
replace non-printable characters with a hex string like "0x00", "0x01", and
so on. Or "\u0000", "\u0001".
This might be more helpful than asking customer to record traffic in
Wireshark or to re-run with debug logging.
Thoughts?
Gary
Re: A better message for an "Invalid request line"
Posted by Gary Gregory <ga...@gmail.com>.
On Sat, Feb 24, 2018 at 8:26 AM, Gary Gregory <ga...@gmail.com>
wrote:
>
>
> On Wed, Feb 21, 2018 at 2:43 AM, Oleg Kalnichevski <ol...@apache.org>
> wrote:
>
>> On Tue, 2018-02-20 at 12:55 -0700, Gary Gregory wrote:
>> > Hi All:
>> >
>> > I am debugging a use case where my HTTP server receives junk it
>> > seems:
>> >
>> > org.apache.http.ProtocolException: Invalid request line: 4 ւ
>> > HTTP/1.1 /logon 137.134.250.10 rsmob.rocketsoftware.com ہ
>> > application/json
>> > cache-control no-cache
>> > Postman-Token $8c44259f-5e7c-47eb-ba73-2146e791b82f
>> > PostmanRuntime/7.1.1 */* rsmob.rocketsoftware.com
>> > gzip, deflate 44
>> > at
>> > org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractM
>> > essageParser.java:209)
>> > ~[httpcore-nio-4.4.9.jar:4.4.9]
>> >
>> > The square boxes I am seeing are not really helpful. I wonder if we
>> > should
>> > replace non-printable characters with a hex string like "0x00",
>> > "0x01", and
>> > so on. Or "\u0000", "\u0001".
>> >
>> > This might be more helpful than asking customer to record traffic in
>> > Wireshark or to re-run with debug logging.
>> >
>> > Thoughts?
>> >
>> > Gary
>>
>> Sounds reasonable. We might also want to put a limit on the length of
>> the resultant error message.
>>
>
> I created https://issues.apache.org/jira/browse/HTTPCORE-514 and have an
> implementation for Core 4 and will port to Core 5.
>
This is done. I did not implement a size limit on messages. I might do that
later this coming week. What would a reasonable default limit be? 1024
chars? Should you be able to configure it?
Gary
>
> Gary
>
>
>> Cheers
>>
>> Oleg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>> For additional commands, e-mail: dev-help@hc.apache.org
>>
>>
>
Re: A better message for an "Invalid request line"
Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Feb 21, 2018 at 2:43 AM, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Tue, 2018-02-20 at 12:55 -0700, Gary Gregory wrote:
> > Hi All:
> >
> > I am debugging a use case where my HTTP server receives junk it
> > seems:
> >
> > org.apache.http.ProtocolException: Invalid request line: 4 ւ
> > HTTP/1.1 /logon 137.134.250.10 rsmob.rocketsoftware.com ہ
> > application/json
> > cache-control no-cache
> > Postman-Token $8c44259f-5e7c-47eb-ba73-2146e791b82f
> > PostmanRuntime/7.1.1 */* rsmob.rocketsoftware.com
> > gzip, deflate 44
> > at
> > org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractM
> > essageParser.java:209)
> > ~[httpcore-nio-4.4.9.jar:4.4.9]
> >
> > The square boxes I am seeing are not really helpful. I wonder if we
> > should
> > replace non-printable characters with a hex string like "0x00",
> > "0x01", and
> > so on. Or "\u0000", "\u0001".
> >
> > This might be more helpful than asking customer to record traffic in
> > Wireshark or to re-run with debug logging.
> >
> > Thoughts?
> >
> > Gary
>
> Sounds reasonable. We might also want to put a limit on the length of
> the resultant error message.
>
I created https://issues.apache.org/jira/browse/HTTPCORE-514 and have an
implementation for Core 4 and will port to Core 5.
Gary
> Cheers
>
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
Re: A better message for an "Invalid request line"
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2018-02-20 at 12:55 -0700, Gary Gregory wrote:
> Hi All:
>
> I am debugging a use case where my HTTP server receives junk it
> seems:
>
> org.apache.http.ProtocolException: Invalid request line: 4 ւ
> HTTP/1.1 /logon 137.134.250.10 rsmob.rocketsoftware.com ہ
> application/json
> cache-control no-cache
> Postman-Token $8c44259f-5e7c-47eb-ba73-2146e791b82f
> PostmanRuntime/7.1.1 */* rsmob.rocketsoftware.com
> gzip, deflate 44
> at
> org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractM
> essageParser.java:209)
> ~[httpcore-nio-4.4.9.jar:4.4.9]
>
> The square boxes I am seeing are not really helpful. I wonder if we
> should
> replace non-printable characters with a hex string like "0x00",
> "0x01", and
> so on. Or "\u0000", "\u0001".
>
> This might be more helpful than asking customer to record traffic in
> Wireshark or to re-run with debug logging.
>
> Thoughts?
>
> Gary
Sounds reasonable. We might also want to put a limit on the length of
the resultant error message.
Cheers
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org