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

  • SEARCH
  • Home
  • 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 4616170
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:56:38+00:00 2026-05-22T01:56:38+00:00

i build proxy server and it works great, however there are some sites which

  • 0

i build proxy server and it works great, however there are some sites which he cannot handle.
I tried to reduce the problem to its core and this is what i came up with:
My test case is: http://bits.wikimedia.org/en.wikipedia.org/load.php
which is one of the http messages transfered in each wikipedia page.
So i tried to build a request for it and send it via a socket like this:

String request1 = 
    "GET http://bits.wikimedia.org/en.wikipedia.org/load.php HTTP/1.1" + 
    "\r\n" + 
    "Host: bits.wikimedia.org" + "\r\n" +
    "User-Agent: MyHttpProxy/example.java (http://stackoverflow.com/q/5924490/319266)" +
    "\r\n" + "\r\n";

However i got 404 return code – which was strange because this page does exist!
I made alot of trys and made a new request which was different only in the request line:

String request2 = 
     "GET /en.wikipedia.org/load.php HTTP/1.1" + 
     "\r\n" + 
     "Host: bits.wikimedia.org" + 
     "\r\n" +
     "User-Agent: MyHttpProxy/example.java (http://stackoverflow.com/q/5924490/319266)" + 
     "\r\n" + "\r\n";

and it worked! a good 200 was brought back with
some unimportent content(“/* No modules requested. Max made me put this here */”)

Can anyone tell me what is the problem here?
i looked at the rfc and i couldnt make any reason of this…

Here is the source code for running this test and print the resuls:

  • 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-05-22T01:56:38+00:00Added an answer on May 22, 2026 at 1:56 am

    You would provide the full URL in the request line only if you’re going via a proxy server. Direct requests to a web server need to follow the form as in request2 in your example.

    Looking at the source, you send requests to port 80, which almost 100% means they’re not going through a proxy. My guess is that you need to send request1 to port 8080 or whatever port your proxy is listening on.

    As for the RFC, take a look at section 5.1.2. Note that the absolute path is used with proxies, and relative path with origin servers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.