Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header parsing error #90

Open
DobromirM opened this issue Aug 8, 2022 · 1 comment
Open

Header parsing error #90

DobromirM opened this issue Aug 8, 2022 · 1 comment
Labels
C-bug Category: bug

Comments

@DobromirM
Copy link
Member

From the logs of one of the live apps that we have when a web crawler hits it:

error: expected carriage return, but found ','
  --> :11:20
   |
11 | User-Agent: Expanse, a Palo Alto Networks company, searches across the global IPv4 space multiple times per day to identify customers' presences on the Internet. If you would like to be excluded from our scans, please send IP addresses/domains to: [email protected]
   |                    ^
        at swim.codec.Parser.error(Parser.java:236)
        at swim.http.HttpRequestParser.parse(HttpRequestParser.java:174)
        at swim.http.HttpRequestParser.feed(HttpRequestParser.java:53)
        at swim.codec.InputParser.parse(InputParser.java:51)
        at swim.codec.InputParser.feed(InputParser.java:32)
        at swim.codec.Parser.feed(Parser.java:149)
        at swim.codec.Parser.feed(Parser.java:101)
        at swim.io.IpSocketModem.doRead(IpSocketModem.java:165)
        at swim.io.TcpSocket.doRead(TcpSocket.java:230)
        at swim.io.StationTransport.doRead(Station.java:588)
        at swim.io.StationReader.runTask(Station.java:878)
        at swim.concurrent.TheaterTask.run(Theater.java:439)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
@DobromirM DobromirM added the C-bug Category: bug label Aug 9, 2022
@DobromirM DobromirM changed the title User-Agent header parsing error Header parsing error Aug 10, 2022
@DobromirM
Copy link
Member Author

This is not unique to the User-Agent header and happens for all headers. Ideally we need to decide if the server should return a malformatted error or discard the invalid headers and process the rest of the request normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant