This project is archived and is in readonly mode.
accept header with */* does not match html templates
Reported by Alex Tambellini | February 5th, 2011 @ 10:27 PM | in 3.1
See the comments attached to this commit for details:
https://github.com/rails/jquery-ujs/commit/22877193b17f2c257a83faca...
Comments and changes to this ticket
-
Santiago Pastorino February 6th, 2011 @ 09:14 PM
- State changed from new to open
- Milestone set to 3.1
- Importance changed from to Low
Can you provide a test case?
-
Alex Tambellini February 6th, 2011 @ 10:10 PM
Attached is a rails app that demonstrates the bug:
It has a html controller with an index action and a post action.
The index action renders 2 forms that use :remote => true.
Both forms submit to the post action with the accept header containing /. However, only the form that includes :"data-type" => "html" succeeds.
Just start the app (rails 3.0.3) and go to localhost:3000 and then click on "Submit With Data Type" and "Submit Without Data Type" buttons to see the behavior described above.
-
Mathieu Ravaux February 27th, 2011 @ 01:34 AM
Here is a patch that solves this issue.
I've tested it against Alex's app. -
Santiago Pastorino February 27th, 2011 @ 04:01 AM
- Assigned user set to Santiago Pastorino
hey Methieu we need a test case to apply the patch.
Thanks. -
Mathieu Ravaux February 27th, 2011 @ 05:05 AM
Hi Santiago, thank you for your quick reply. It's encouraging for a first contribution !
Here is the testcase:
-
Jeff Kreeftmeijer February 27th, 2011 @ 05:25 PM
Hey Mathieu,
Nice work on your first patch! The testcase looks good too.
One thing: could you merge the testcase and the fix into one commit and supply a new patch? :)
-
Jeff Kreeftmeijer February 28th, 2011 @ 11:43 PM
- State changed from open to verified
Verified. The patch applies to master and the provided test fails without it. :)
-
Jason Roth May 7th, 2011 @ 09:22 PM
Added this issue to github issues:
https://github.com/rails/rails/issues/439-j
-
Jason Roth May 7th, 2011 @ 09:35 PM
Ignore my comment above - I posted it to the wrong issue. Sorry -j
-
Jason Noble May 7th, 2011 @ 10:15 PM
Moved to Github issue https://github.com/rails/rails/issues/444
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>