Bug 60784 - HTTP status line tests ignore trailing space after status code in status line (incomplete RFC test)
Summary: HTTP status line tests ignore trailing space after status code in status line...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.11
Hardware: All All
: P2 minor (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-28 12:23 UTC by Michael Osipov
Modified: 2017-03-01 15:20 UTC (History)
0 users



Attachments
Test for trailing space in status line (3.41 KB, patch)
2017-02-28 12:23 UTC, Michael Osipov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2017-02-28 12:23:27 UTC
Created attachment 34783 [details]
Test for trailing space in status line

RFC mandates for status line a mandatory space (U+0020) and optional reason phrase. Several tests do not check for or even trim the status line.

The attached patch adds the space to the tests.
Comment 1 Mark Thomas 2017-03-01 14:54:17 UTC
The tests in question aren't (explicitly) testing the format of the status line. They are testing that the correct status code is returned.

I don't see any harm in expanding the tests to check for the space. I'll apply the patch shortly.
Comment 2 Michael Osipov 2017-03-01 15:01:31 UTC
(In reply to Mark Thomas from comment #1)
> The tests in question aren't (explicitly) testing the format of the status
> line. They are testing that the correct status code is returned.
> 
> I don't see any harm in expanding the tests to check for the space. I'll
> apply the patch shortly.

That's true, but some other tests do include the space character. This simply cleans up the remaining tests and adds the extra check for free. It is rather trivial.
Comment 3 Mark Thomas 2017-03-01 15:20:56 UTC
Thanks. Patch applied.