开发者

Rails duplicating requests

After correcting some other bugs on the application I found out that one page is being rendered twice on every request.

Rails completes the request normally and after a few, simply starts another request.

At first thought it was a Firebug problem or YSlow doing other requests, but after more tests the duplication remained and I discarded those reasons.

I tried even debugging rails step by step in the request, it goes normally and after completing the first request, I get stopped in the same debugger start line again, this time for the second request.

Printed some lines and things to see clearly on log and it clearly makes 2 requests.

I also found a few wierd requests that I cannot explain also

This bit of log shows the end of the first request and right after that one, there is a wierd index request without layout and then the same request starts again to be processed:

    Processing ArtistImagesController#index (for 192.168.0.11 at 2010-07-08 15:10:56) [GET] 
    Parameters: {"action"=>"index", "locale"=>"pt", "controller"=>"artist_images", "artist_id"=>"2-tom-welling"}

    #^ Start of first request
    #v end of first request

    Completed in 812ms (View: 429, DB: 41) | 200 OK [http://192.168.0.20/artistas/2-tom-welling/imagens]
          SQL (0.2ms)   SET NAMES 'utf8'
          SQL (0.2ms)   SET SQL_AUTO_IS_NULL=0

    # v wierd request     
        Processing ApplicationController#index (for 192.168.0.11 at 2010-07-08 15:10:59) [GET]
        Rendering rescues/layout (not_found)
        -----------------------------------------------------> html
          SQL (0.2ms)   SET NAMES 'utf8'
          SQL (0.2ms)   SET SQL_AUTO_IS_NULL=0

    # v start of second request
        Processing ArtistImagesController#index (for 192.168.0.11 at 2010-07-08 15:11:00) [GET]
          Parameters: {"action"=>"index", "locale"=>"pt", "controller"=>"artist_images", "artist_id"=>"2-tom-welling"}

Remembering that all those requests were generated by entering the page only once :/ Searched the code for possible loops or any kind of errors but haven't found any.

Pleas开发者_如何学编程e help is very appretiated


Search your page source for empty image src attributes. For such images the browser requests the site root, which seems to be the case.


I think your page is submitting two times. can i view your page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜