-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
HTTP reason phrase is omitted from responses #20
Comments
the RFC does state:
...but I'll see what I can do to fix this. most probably I'll append the reason based on an internal mapping so I don't have to break the current interface. |
Sure, but it's still a mandatory part of the status line — even if a parser just skips over it, it can still expect it to be there. Thanks in advance for looking into this. :) One thing you could do would be to just return the same static string all the time, since a client is unlikely to depend on the value, but there does need to be something there to be valid HTTP. |
I guess I misinterpreted that. in any case, 0.8.1 fixes it. |
The HTTP 1.1 RFC defines a response status line like this:
However, since Mockito switched to constructing HTTP responses manually, instead of through Hyper, it has omitted the reason phrase (and indeed has no way of setting it without either modifying the API to require it being specified by the user, or maintaining an internal mapping of status codes to reason phrases like Hyper does). This means that correctly implemented HTTP clients may fail to parse responses generated by Mockito. Hyper itself is one of these clients that can't understand Mockito responses.
The text was updated successfully, but these errors were encountered: