DELETE request not working

Discussion in 'Ruby/Rails' started by bruno_c, Nov 22, 2006.

  1. bruno_c

    bruno_c New Member

    Hi everyone,

    I'm using edge rails with REST support. My problem is when I want to delete a resource using DELETE, Litespeed doesn't even talk to the rails app and send me back a "302 found" response. I'm using the 2.2.5 standard release.

    With Mongrel I hadn't this problem, so I think it's a Litespeed issue. Is there a solution?

    Last edited: Nov 22, 2006
  2. mistwang

    mistwang LiteSpeed Staff

    Please tell me exactly how the DELETE request looks like. I will try to produce it.
  3. bruno_c

    bruno_c New Member

    I'm just using curl for the moment:

    curl -X DELETE ""

    <head><title> 302 Found
    <body><h1> 302 Found
    The document has been temporarily moved to <A HREF="%s">here</A>.<hr />
    Powered By <a href=''>LiteSpeed Web Server</a><br />
    <font face="Verdana, Arial, Helvetica" size=-1>Lite Speed Technologies is not responsible for administration and contents of this web site!</font></body></html>
    I have this response even if the resource doesn't exist...

    Thanks for your help.
  4. mistwang

    mistwang LiteSpeed Staff

    OK, this is fixed. that because of the 404 handler used for Rails requests. If you use rewrite rule to dispatch rails requests, it will not happen.

    Thanks for the bug report.
  5. bruno_c

    bruno_c New Member

    Do I need to install a new version or it was already fixed in 2.2.5? If yes, I don't understand what I need to do..
    I tried to enable rewrite but it doesn't change anything.

    Sorry, I'm new to Litespeed.

    Thanks again for your help.
  6. mistwang

    mistwang LiteSpeed Staff

    Fix will be in 2.2.6.
    If you want to try rewrite, you can add rewrite rules in public/.htaccess to the Rails Context.
  7. bruno_c

    bruno_c New Member

    Okay, thanks. I will wait the next release.
  8. xing

    xing LiteSpeed Staff


    2.2.6 has been released.

Share This Page