Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Query Strings case sensitive?  RSS feed

 
Mike London
Ranch Hand
Posts: 1335
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application, I need to make the host name part of the URL lowercase. Thus, www.javaranch.com would be in lower case.

My question is that can I just treat the entire URL as lowercase or would this affect servlets (etc.) that would expect case-sensitive query string variables?

If query string variables need to have their case respected, then I need to parse (or use a built-in method) to extract just the host name.

Thanks very much in advance for all replies.

-mike
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the query string is case-sensitive.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And the built-in method you're looking for is getHost() in the java.net.URL class.
 
Mike London
Ranch Hand
Posts: 1335
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul!!!

I appreciate your (helpful) reply.

Mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!