-
Notifications
You must be signed in to change notification settings - Fork 5.5k
bug_10591 - update regex to require one or more spaces (changed from zer... #782
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…zero or more) between the status code and the reason code. RFC2616 says Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF Reason-Phrase does not appear to be optional, hence I haven't wrapped as a non-capturing option. Updated test case to catch any regressions if the regex is changed at this point again.
…o I support that, with and without a trailing space as also implied by the RFC Reason-Phrase = *<TEXT, excluding CR, LF> Because of the star (*) I read this as "empty reason phrase is allowed". (http://grokbase.com/t/apache/dev/085mz81ecq/empty-reason-phrase-bz-44995-45092)
nurse
added a commit
that referenced
this pull request
Dec 23, 2014
* lib/net/http/response.rb (Net::HTTPResponse): require one or more spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> #782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@48952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ayumin
pushed a commit
to ayumin/ruby
that referenced
this pull request
Jan 4, 2015
spaces [Bug ruby#10591]. by leriksen <leif.eriksen.au@gmail.com> ruby#782 fix rubyGH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
evanphx
pushed a commit
that referenced
this pull request
Jan 14, 2015
* lib/net/http/response.rb (Net::HTTPResponse): require one or more spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> #782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
evanphx
pushed a commit
that referenced
this pull request
Feb 19, 2015
* lib/net/http/response.rb (Net::HTTPResponse): require one or more spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> #782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt
pushed a commit
that referenced
this pull request
Mar 10, 2015
* lib/net/http/response.rb (Net::HTTPResponse): require one or more spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> #782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt
pushed a commit
that referenced
this pull request
Mar 10, 2015
* lib/net/http/response.rb (Net::HTTPResponse): require one or more spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> #782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mmasaki
pushed a commit
to mmasaki/ruby
that referenced
this pull request
May 30, 2015
spaces [Bug ruby#10591]. by leriksen <leif.eriksen.au@gmail.com> ruby#782 fix rubyGH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt
pushed a commit
to ruby/net-http
that referenced
this pull request
Feb 13, 2020
spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> ruby/ruby#782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bug_10591 - update regex to require one or more spaces (changed from zero or more) between the status code and the reason code.
RFC2616 says
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
http://grokbase.com/t/apache/dev/085mz81ecq/empty-reason-phrase-bz-44995-45092
Reason-Phrase = *<TEXT, excluding CR, LF>
This seems to imply that the Reason-Phrase can be empty.
Updated test cases to catch any regressions if the regex is changed at this point again.