Thanks. The error was on my end -- the header value included a trailing newline.

On Thu, Dec 15, 2022 at 10:59 PM Mark Thomas <ma...@apache.org> wrote:
>
> Got it thanks.
>
> I can see what the problem is now.
>
> The line ending for the If-None-Match header is CR. It should be CRLF.
>
> RFC 7230 does allow servers to accept just LF (Tomcat does) but a bare
> CR is not acceptable. It Tomcat sees a CR followed by anything other
> than a LF that will trigger a 400 response.
>
> Earlier Tomcat versions were more lenient but we have tightened things
> up over time - usually in response to request smuggling concerns.
>
> CR 0x0d carriage return
> LF 0x0a line fine
>
> HTH,
>
> Mark
>
>
> On 15/12/2022 21:23, Mark Thomas wrote:
> > Sounds good. Could you send it directly to me again please.
> >
> > Thanks.
> >
> > Mark
> >
> >
> > On 15/12/2022 20:15, Martynas Jusevičius wrote:
> >> OK, I think I got them.
> >>
> >> GET /default-subject is the request with the If-None-Match header.
> >>
> >> On Thu, Dec 15, 2022 at 9:11 PM Mark Thomas <ma...@apache.org> wrote:
> >>>
> >>> Thanks, I have the pcap file.
> >>>
> >>> It looks to be the right network connection as it shows the start of a
> >>> connection to port 8080.
> >>>
> >>> However, it only contains the first packet. I need at least all the
> >>> packets up to the point the HTTP request is sent and ideally all the
> >>> packets from the connection.
> >>>
> >>> If you can capture more packets, I think we'll have what we need.
> >>>
> >>> Mark
> >>>
> >>>
> >>>
> >>> On 15/12/2022 20:03, Mark Thomas wrote:
> >>>> Hi Martynas,
> >>>>
> >>>> The list strips (nearly all) attachments. Please send it to me directly
> >>>> and I'll let you know if it is what we need.
> >>>>
> >>>> Mark
> >>>>
> >>>>
> >>>> On 15/12/2022 19:51, Martynas Jusevičius wrote:
> >>>>> Hi Mark,
> >>>>>
> >>>>> I've captured something using
> >>>>> https://github.com/nicolaka/netshoot#tcpdump (attached as a .pcap
> >>>>> file), but I'm not sure it's correct and/or what you need.
> >>>>>
> >>>>> If you gave me some instructions, that would be easier. My app is
> >>>>> running in a Docker container, the request comes from a script on WSL
> >>>>> 2 Ubuntu.
> >>>>>
> >>>>> Martynas
> >>>>>
> >>>>> On Thu, Dec 15, 2022 at 6:45 PM Mark Thomas <ma...@apache.org> wrote:
> >>>>>>
> >>>>>> Hard to tell from the data posted.
> >>>>>>
> >>>>>> What we really need to see are the bytes on the wire for a failed
> >>>>>> request. Can you capture that with wireshark (or similar) and post
> >>>>>> what
> >>>>>> you find?
> >>>>>>
> >>>>>> Mark
> >>>>>>
> >>>>>>
> >>>>>> On 15/12/2022 16:17, Martynas Jusevičius wrote:
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> After upgrading from 9.0.59 to 10.1.4, I've started getting these
> >>>>>>> kind
> >>>>>>> of errors:
> >>>>>>>
> >>>>>>> java.lang.IllegalArgumentException: The HTTP header line
> >>>>>>> [if-none-match:"e76590d5""] does not conform to RFC 7230 and has
> >>>>>>> been
> >>>>>>> ignored.
> >>>>>>>            at
> >>>>>>> org.apache.coyote.http11.Http11InputBuffer.skipLine(Http11InputBuffer.java:1093)
> >>>>>>>            at
> >>>>>>> org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:991)
> >>>>>>>            at
> >>>>>>> org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:604)
> >>>>>>>            at
> >>>>>>> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:295)
> >>>>>>>            at
> >>>>>>> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
> >>>>>>>            at
> >>>>>>> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:859)
> >>>>>>>            at
> >>>>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1734)
> >>>>>>>            at
> >>>>>>> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
> >>>>>>>            at
> >>>>>>> org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
> >>>>>>>            at
> >>>>>>> org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
> >>>>>>>            at
> >>>>>>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> >>>>>>>            at java.base/java.lang.Thread.run(Thread.java:833)
> >>>>>>>
> >>>>>>> Request headers look like this:
> >>>>>>>
> >>>>>>> GET /default-subject HTTP/1.1
> >>>>>>> Host: localhost:8080
> >>>>>>> User-Agent: curl/7.58.0
> >>>>>>> Accept: application/n-triples
> >>>>>>> If-None-Match: "e76590d5"
> >>>>>>>
> >>>>>>> Can someone please explain to me what the problem is here? I
> >>>>>>> guess the
> >>>>>>> Tomcat doesn't like the ETag value, but why?
> >>>>>>>
> >>>>>>> Thanks.
> >>>>>>>
> >>>>>>> Martynas
> >>>>>>>
> >>>>>>> ---------------------------------------------------------------------
> >>>>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>>>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>>>>>
> >>>>>>
> >>>>>> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to