Example code which reproduces the problem:
https://gist.github.com/874847
Run the app. Open the page. Login with test and test. Reload a few times. Page loads fine. Then make DELETE request by clicking the button. Now when you reload it asks for username and password again. If you check the logs you can see credentials are now broken.
--
Mika Tuupola
http://www.appelsiini.net/
> I am not sure whether this is Sinatra or Rack::Auth::Basic issue. However I noticed that basic auth credentials get garbled after doing a DELETE request. I can reproduce this with Thin, Shotgun (Mongrel) and Passenger. I have tested with Sinatra 1.1.0, Rack 1.2 and ruby 1.8.7 (one provided with OSX and REE 2010.02 on CentOS 5).
This is Safari issue and not related to the HTTP verb nor Sinatra. I sniffed the headers with tcpdump and found out Authorization header breaks after browser gets 302 redirect and you do a reload. For those who interested test case and header dumps at:
https://gist.github.com/874847
--
You received this message because you are subscribed to the Google Groups "sinatrarb" group.
To post to this group, send email to sina...@googlegroups.com.
To unsubscribe from this group, send email to sinatrarb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sinatrarb?hl=en.
> I saw this the other day somewhere totally unrelated. Thanks for sharing your findings!
As a sidenote. Apache seems to recover from the broken header and does not ask for the password again. Rack based applications will ask for password again. Have not tested with other webservers. Also filed a bug about this:
https://bugs.webkit.org/show_bug.cgi?id=56716