Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8870469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:44:22+00:00 2026-06-14T17:44:22+00:00

I use Requests and some URL’s give a different response code than a call

  • 0

I use Requests and some URL’s give a different response code than a call with the same URL in a browser.

For example:

import requests
req = requests.get('http://www.jordaaninfo.nl')
responsecode = req.status_code
# responsecode == 500

gives a responsecode 500 while the page http://www.jordaaninfo.nl is available via Chrome/FF/Safari.

Thanks,
Niels

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:44:23+00:00Added an answer on June 14, 2026 at 5:44 pm

    In my Firefox the 500 status code also occurs for http://www.jordaaninfo.nl, but the page is displayed anyway. This can be seen in the Net tab of Firebug.
    My Chromium browser on Linux gets a 200 OK.

    The problem (and solution) is in the Accept-Language header in the request.
    Apparently, the server has special needs in this respect 😉

    The problem and solution can be demonstrated with wget:

    $ wget 'http://www.jordaaninfo.nl/'
    --2012-11-20 23:15:20--  http://www.jordaaninfo.nl/
    Resolving www.jordaaninfo.nl... 87.250.155.10
    Connecting to www.jordaaninfo.nl|87.250.155.10|:80... connected.
    HTTP request sent, awaiting response... 500 Internal Server Error
    2012-11-20 23:15:22 ERROR 500: Internal Server Error.
    
    $ wget --header="Accept-Language: Accept-Language: en;q=0.8,en-us;q=0.5" 'http://www.jordaaninfo.nl/'
    --2012-11-20 23:16:01--  http://www.jordaaninfo.nl/
    Resolving www.jordaaninfo.nl... 87.250.155.10
    Connecting to www.jordaaninfo.nl|87.250.155.10|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    ....
    

    The 500 Error in my Firefox was caused by language ‘nl’ as first entry in the Accept-Language setting:

    nl,en;q=0.8,en-us;q=0.5,fy;q=0.3 --> 500 ERROR
    en,nl;q=0.8,en-us;q=0.5,fy;q=0.3 --> 200 OK
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing code that will use AJAX requests to get some HTML code
I want to use WCF pipeline to handle requests of some custom format (not
I use the following code to handle failed requests. - (void)requestFailed:(ASIHTTPRequest *)request { [self.alertView
I can use HttpListener to listen for requests coming from the same computer, but
I can use urllib2 to make HEAD requests like so: import urllib2 request =
I have 2 different XMLHttpRequest objects making asynchronous requests to the same web service.
Sometimes, you may need to call a 'login' url, passing in some sort of
I have several ajax requests in a script, some sync some async I use
Via asynchronous HTTP requests, I can use an existing service to load/save some information
I am wondering if I could use simply use HTTP POST Requests in order

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.