Menu

#103 multiple URLs mess up httpcodes

closed-fixed
http (206)
3
2013-06-21
2001-08-14
No

% curl localhost:8888 -o /dev/null -w '%{http_code}'
000 curl: (7) Connection timed out

Localhost:8888 is down and hence above result is fine

% curl www.perl.com -o /dev/null -w '%{http_code}'
200

perl is up and the above result is fine too!

Now let us combine the two URLs
% curl '{www.perl.com,localhost:88}' -w '%{http_code}'
200
200

Which is NOT right!!

Discussion

  • Ramana Mokkapati

    Logged In: YES
    user_id=103055

    % curl '{localhost:8888,www.perl.com}'
    000
    200

    is fine....so the order of URLs is making a diff..which is
    a bug

     
  • Daniel Stenberg

    Daniel Stenberg - 2001-08-15

    Logged In: YES
    user_id=1110

    Thanks for your report!

    Yes, this was indeed the internal httpcode-variable that
    wasn't properly reset between individual requests. If one
    would fail, like you describe, the old value remained.
    This is corrected now in the current development version in CVS.

     
  • Daniel Stenberg

    Daniel Stenberg - 2001-08-15
    • priority: 5 --> 3
    • status: open --> closed-fixed
     
MongoDB Logo MongoDB