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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:04:03+00:00 2026-05-30T08:04:03+00:00

I recently came across a server that’s sending a Location header (for a redirect)

  • 0

I recently came across a server that’s sending a Location header (for a redirect) that looks like this:

Location: http://www.example.com/something.ext?auth=123|123

When I try to use this in my Java program it complains about an “Illegal character in query” and fails.

So is the server doing something incorrect? Is this legal?

  • 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-30T08:04:05+00:00Added an answer on May 30, 2026 at 8:04 am

    Use escapes:

    • http://www.december.com/html/spec/esccodes.html

    | is escaped with %7C, so your URL becomes:

    Location: http://www.example.com/something.ext?auth=123%7C123
    

    Location header as per HTTP/1.1 is defined as:

    Location       = "Location" ":" absoluteURI 
    

    Per HTTP/1.1:

    For definitive information on URL syntax and semantics, see "Uniform Resource Identifiers (URI): Generic Syntax and Semantics," RFC 2396

    RFC 2396 is obsoleted by RFC 3986, which requires escaping of some characters (see the RFC for the definitive information). It’s the responsibility of the source to provide the correct URL, so yes – you are responsible to provide a correctly escaped URL in this case.

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

Sidebar

Related Questions

I recently came across some code that looks something like this: <head> <?php /*
I recently came across this interview question (posted in a forum somehwere... looks like
I recently came across this blog post which basically says that we should not
I recently came across some code that looked like: if(sizeof(var,2) == 4) { ...
I recently came across http://chromeexperiments.com/ . I found a couple of projects there that
I recently came across this post on Forrst: http://forr.st/~Nbp and thought it'd be a
I recently came across some code like this: parent && parent.removeChild(this); Which takes the
I recently came across an IE7 only bug that I thought I'd share so
I recently came across a ASP 1.1 web application that put a whole heap
I recently came across this in some code - basically someone trying to create

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.