This project is archived and is in readonly mode.
accept header with */* does not match html templates
-
Santiago Pastorino
- State changed from new to open
- Milestone set to 3.1
- Importance changed from to Low
Can you provide a test case?
-
Alex Tambellini
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
Here is a patch that solves this issue.
I've tested it against Alex's app. -
Santiago Pastorino
- Assigned user set to Santiago Pastorino
hey Methieu we need a test case to apply the patch.
Thanks. -
Mathieu Ravaux
Hi Santiago, thank you for your quick reply. It's encouraging for a first contribution !
Here is the testcase:
-
Jeff Kreeftmeijer
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? :)
-
Mathieu Ravaux
Sure, here it is !
Thanks for reviewing it. -
Jeff Kreeftmeijer
- State changed from open to verified
Verified. The patch applies to master and the provided test fails without it. :)
-
Jason Roth
Added this issue to github issues:
https://github.com/rails/rails/issues/439-j
-
Jason Roth
Ignore my comment above - I posted it to the wrong issue. Sorry -j
-
Jason Noble
Moved to Github issue https://github.com/rails/rails/issues/444
-
Jason Noble
This has been pushed to master and can be closed.
