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 6761717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:13:31+00:00 2026-05-26T14:13:31+00:00

This is a bit of a weird one. I’m using HTTPClient 4.1.2, and it

  • 0

This is a bit of a weird one. I’m using HTTPClient 4.1.2, and it seems that whenever it finds are URL with something like a ‘#’ in it, it does a full get with the # in the URL.

For example, trying to get the URL http://stks.co/eWt will redirect to the URL http://news.ichinastock.com/2011/10/jack-ma-alibaba-has-prepared-20-billion-to-acquire-yahoo/#.Tpw-xG61XjU.twitter. Now this URL is live, but the problem is the HTTPClient sends a get request with the URI set to URI: /2011/10/jack-ma-alibaba-has-prepared-20-billion-to-acquire-yahoo/#.Tpw-xG61XjU.twitter which causes the server to send back a 404 page not found.

Looking at the GET sent by IE, Firefox and cURL, they all strip out the #… from the end of the URI, so for example the cURL GET request URI is set as URI: /2011/10/jack-ma-alibaba-has-prepared-20-billion-to-acquire-yahoo/ – all the #… have been removed. This is for the exact same entry URL of http://stks.co/eWt.

As a test, sending this raw URL into HTTPClient (i.e. HttpGet httpget = new HttpGet("http://news.ichinastock.com/2011/10/jack-ma-alibaba-has-prepared-20-billion-to-acquire-yahoo/#.Tpw-xG61XjU.twitter");) gives the same 404 not found result.

So the question is are there any settings in HTTPClient that can be set so that things like the trailing #… can be auto removed from URLs. Or how would I go about manually removing this from URLs (remember that I would need to capture all redirect URLs as well)?

  • 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-26T14:13:31+00:00Added an answer on May 26, 2026 at 2:13 pm

    It sounds like their web server is broken. The URI specification says that a number sign (#) terminates the path portion of the URI. If a web server considers anything after a # part of the path, it is not following the URI specification.

    The path component contains data, usually organized in hierarchical form, that, along with data in the non-hierarchical query component, serves to identify a resource within the scope of the URI’s scheme and naming authority (if any). The path is terminated by the first question mark (“?”) or number sign (“#”) character, or by the end of the URI.” – RFC3986

    I tested a few popular web servers, and they all parse these URIs correctly, ignoring the portion after the number sign.

    I don’t have any good suggestions for a workaround though. But at least now you know who to blame.

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

Sidebar

Related Questions

Okay, this one seems to me a bit weird. Any help would be greatly
This is a bit of a weird one, and I could well be coding
I've found it very weird that simple code like this is not valid: select
Bit of a weird one this. I'm rendering datasets on a map and need
I thought I understood ViewState, but this is a bit of a weird one.
This one is weird, I have a page that consists of a html table
This is a bit of weird scenario. I had a class that was quickly
This is a bit of a weird request but I am trying to set
This bit of code comes with new classes that are subclasses of UITableViewController... -
Um, this might sound a bit weird. We were having some problems with a

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.