Prototype framework supports IE6+, Firefox, Opera and Safari, right? I have recently put up a simple test case of supported HTTP methods here (after you open the page please give it a minute for the script to finish): http://admin.ipo.hr/rails/test/ Turns out all of these browsers support PUT and DELETE out of the box (except Safari, I didn''t have the chance to test that one - anyone?). So why do we still emulate these methods with "_method" parameter over POST? -- Mislav --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 17, 2006, at 12:53 PM, Mislav wrote:> > Prototype framework supports IE6+, Firefox, Opera and Safari, right? I > have recently put up a simple test case of supported HTTP methods here > (after you open the page please give it a minute for the script to > finish): > > http://admin.ipo.hr/rails/test/ > > Turns out all of these browsers support PUT and DELETE out of the box > (except Safari, I didn''t have the chance to test that one - anyone?). > So why do we still emulate these methods with "_method" parameter over > POST?(1) We don''t want to rely on XHR for HTTP requests -- we want the browser to make them. (2) Many HTTP proxies don''t support PUT, DELETE, PROPFIND, etc... And by the way, Safari fails... that''s pretty much a showstopper in the Rails community. GET: OK POST: OK HEAD: fail (got GET) PUT: fail (got GET) DELETE: fail (got GET) PROPFIND: fail (got GET) PROPPATCH: fail (got GET) MKCOL: fail (got GET) COPY: fail (got GET) MOVE: fail (got GET) LOCK: fail (got GET) UNLOCK: fail (got GET) VERSION-CONTROL: fail (got GET) REPORT: fail (got GET) CHECKOUT: fail (got GET) CHECKIN: fail (got GET) UNCHECKOUT: fail (got GET) MKWORKSPACE: fail (got GET) UPDATE: fail (got GET) LABEL: fail (got GET) MERGE: fail (got GET) BASELINE-CONTROL: fail (got GET) MKACTIVITY: fail (got GET) ORDERPATCH: fail (got GET) ACL: fail (got GET) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 17, 8:01 pm, Brad Ediger <b...-sod+mMc99o6+XT7JhA+gdA@public.gmane.org> wrote:> (1) We don''t want to rely on XHR for HTTP requests -- we want the > browser to make them.I''m talking about Prototype Ajax here, which is XHR.> (2) Many HTTP proxies don''t support PUT, DELETE, PROPFIND, etc...Good point, I forgot about that. But how will we know when they do?> And by the way, Safari fails... that''s pretty much a showstopper in > the Rails community.Argh! Thanks for the report. But maybe we could emulate HEAD, PUT and DELETE only for Safari then? Or is the proxy issue a showstopper also? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 17, 2006, at 1:07 PM, Mislav wrote:>> (1) We don''t want to rely on XHR for HTTP requests -- we want the >> browser to make them. > > I''m talking about Prototype Ajax here, which is XHR.Sorry -- I thought you were suggesting abandoning _method across the board. However, I think there is a very strong argument for consistency between the browser-HTTP and XHR APIs. If you have a form without _method that uses Prototype to submit (say using PUT), it cannot gracefully fall back to the browser''s HTTP code if Javascript is disabled, unless the browser supports <form method="put"> directly. This, to me, would be a showstopper in and of itself, except in special situations.>> (2) Many HTTP proxies don''t support PUT, DELETE, PROPFIND, etc... > > Good point, I forgot about that. But how will we know when they do?This is why Internet standards move in terms of years. It''s a catch-22. Until there is a need for proxies to support the additional verbs, the support will most likely not be added. And until proxies support the verbs, we can''t directly use them without workarounds. Your guess is as good as mine.>> And by the way, Safari fails... that''s pretty much a showstopper in >> the Rails community. > > Argh! Thanks for the report. But maybe we could emulate HEAD, PUT and > DELETE only for Safari then? Or is the proxy issue a showstopper also? >See my answer to (1). I think the current workaround works well enough. If you''re using Rails on your backend, it will treat an action called with PUT the same as one called with POST with _method=PUT. So if you want to work around this on the client side, feel free. But I would be very wary of coding against specific browsers. And unless you have a good client-side way to do capability detection rather than testing user-agent (I can''t think of one), I wouldn''t go that route. In any case, you''d still have the proxy issue to deal with, and you have to think through fallback issues for non-Javascript users. Do you have a compelling reason to use these verbs directly rather than the workaround? I certainly would like it if browsers and proxies supported the full set of verbs, but it seems to me that using the _method hack consistently is less painful than having to deal with all of the issues listed above. Brad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Safari (2.0.4) supports it too. (I don''t have an earlier version to test.) I''ve asked the same question--I always have to hack Prototype to allow it. I''ve even opened a patch to add an option (for backward compatibility) to use the methods directly rather than through emulation. http://dev.rubyonrails.org/ticket/6595 TAG tomg-PGZyUNKar/Q@public.gmane.org On Dec 17, 2006, at 11:53 AM, Mislav wrote:> > Prototype framework supports IE6+, Firefox, Opera and Safari, right? I > have recently put up a simple test case of supported HTTP methods here > (after you open the page please give it a minute for the script to > finish): > > http://admin.ipo.hr/rails/test/ > > Turns out all of these browsers support PUT and DELETE out of the box > (except Safari, I didn''t have the chance to test that one - anyone?). > So why do we still emulate these methods with "_method" parameter over > POST? > > -- > Mislav > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Gah. I should clarify. When I said Safari works, I mean that I''ve used it successfully in the past, not that this particular test worked. (Which Brad is right, it doesn''t.) TAG On Dec 17, 2006, at 12:01 PM, Brad Ediger wrote:> > > On Dec 17, 2006, at 12:53 PM, Mislav wrote: > >> >> Prototype framework supports IE6+, Firefox, Opera and Safari, >> right? I >> have recently put up a simple test case of supported HTTP methods >> here >> (after you open the page please give it a minute for the script to >> finish): >> >> http://admin.ipo.hr/rails/test/ >> >> Turns out all of these browsers support PUT and DELETE out of the box >> (except Safari, I didn''t have the chance to test that one - anyone?). >> So why do we still emulate these methods with "_method" parameter >> over >> POST? > > (1) We don''t want to rely on XHR for HTTP requests -- we want the > browser to make them. > (2) Many HTTP proxies don''t support PUT, DELETE, PROPFIND, etc... > > And by the way, Safari fails... that''s pretty much a showstopper in > the Rails community. > > GET: OK > POST: OK > HEAD: fail (got GET) > PUT: fail (got GET) > DELETE: fail (got GET) > PROPFIND: fail (got GET) > PROPPATCH: fail (got GET) > MKCOL: fail (got GET) > COPY: fail (got GET) > MOVE: fail (got GET) > LOCK: fail (got GET) > UNLOCK: fail (got GET) > VERSION-CONTROL: fail (got GET) > REPORT: fail (got GET) > CHECKOUT: fail (got GET) > CHECKIN: fail (got GET) > UNCHECKOUT: fail (got GET) > MKWORKSPACE: fail (got GET) > UPDATE: fail (got GET) > LABEL: fail (got GET) > MERGE: fail (got GET) > BASELINE-CONTROL: fail (got GET) > MKACTIVITY: fail (got GET) > ORDERPATCH: fail (got GET) > ACL: fail (got GET) > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On 12/18/06, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote:> > Gah. I should clarify. When I said Safari works, I mean that I''ve > used it successfully in the past, not that this particular test > worked. (Which Brad is right, it doesn''t.)So how did you use these verbs successfully then? This test is very straightforward, and if Safari doesn''t pass this I don''t see how it could be that it supports these verbs. This is basically it (some logic stripped): xhr = Ajax.getTransport() xhr.open(method, ''echo?m=''+method, false) xhr.send(null) res = xhr.getResponseHeader(''X-Test-success'') || xhr.responseText And if Safari would pass this test, I would suggest stopping emulating these 5 verbs in Prototype, yes. -- Mislav --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I''m wrong. I thought I''d done those tests in the past. I even grabbed my old test and ran it this morning successfully from Safari--I didn''t realize that I''d set it up incorrectly, and was flummoxed when I could get it to run from localhost but not a live server. It wasn''t until after I pulled out Ethereal to try and figure out the difference that I realized my mistake. Sometimes I can be pretty thick headed. The [resolved] WebKit bug report is here: http://bugs.webkit.org/ show_bug.cgi?id=3812 Non-GET/POST methods work in the WebKit nightly.... does anyone know when we''ll see the update in Safari? TAG tomg-PGZyUNKar/Q@public.gmane.org On Dec 18, 2006, at 2:00 PM, Mislav Marohnić wrote:> On 12/18/06, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote: > Gah. I should clarify. When I said Safari works, I mean that I''ve > used it successfully in the past, not that this particular test > worked. (Which Brad is right, it doesn''t.) > > So how did you use these verbs successfully then? This test is very > straightforward, and if Safari doesn''t pass this I don''t see how it > could be that it supports these verbs. > > This is basically it (some logic stripped): > > xhr = Ajax.getTransport() > xhr.open(method, ''echo?m=''+method, false) > xhr.send(null) > res = xhr.getResponseHeader(''X-Test-success'') || xhr.responseText > > And if Safari would pass this test, I would suggest stopping > emulating these 5 verbs in Prototype, yes. > > -- > Mislav > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Am 19.12.2006 um 01:24 schrieb Tom Gregory:> Non-GET/POST methods work in the WebKit nightly.... does anyone > know when we''ll see the update in Safari?My guess is, sadly, that this will only be released w/ Safari 3.0 on 10.5, but one can hope... Best, Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On 19 Dec 2006, at 01:31, Thomas Fuchs wrote:>> Non-GET/POST methods work in the WebKit nightly.... does anyone >> know when we''ll see the update in Safari? > > My guess is, sadly, that this will only be released w/ Safari 3.0 on > 10.5, but one can hope...That''s indeed a safe and realistic bet. At last we will also be able to use TinyMCE and FCKEditor on Safari too (most of the bugs related to these editors have been fixed in the latest nightly). Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---