#349 new
Daniel Vartanov

URI::InvalidURIError if Rails server returns status 304 (Not Modified)

Reported by Daniel Vartanov | January 31st, 2010 @ 07:06 AM

I was testing ETags functionality and found this bug.

Rails has ETags enabled by default, so you can use the following example to reproduce the bug (just replace ETag value and path with actual values)

header 'If-None-Match', '686897696a7c876b7e'
request_page path, :get, {}

(I had to use #request_page instead of #get, cause #get doesn't see custom header I set)

You will get:

bad URI(is not URI?):  (URI::InvalidURIError)
      /usr/lib64/ruby/1.8/uri/common.rb:436:in `split'
      /usr/lib64/ruby/1.8/uri/common.rb:485:in `parse'
      (eval):2:in `request_page'

Notice, that bug will NOT appear if server returns 200(OK), for instance, if ETag doesn't match

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket

Tags

Pages