Trouble with client GET request path

This is a discussion on Trouble with client GET request path within the C Programming forums, part of the General Programming Boards category; When I read in the the client's GET request into my server, I store the path of the file which ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    96

    Trouble with client GET request path

    When I read in the the client's GET request into my server, I store the path of the file which they would like to my path variable. Now if I am the client and use my web browser to contact the server I am using the syntax "http://localhost:3099/temp.html". But when my server gets the request and saves the path variable it is also saving the '/' along with the 'temp.html' when it is read in. How would I go about alleviating this issue. Thanks.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by NuNn View Post
    When I read in the the client's GET request into my server, I store the path of the file which they would like to my path variable. Now if I am the client and use my web browser to contact the server I am using the syntax "http://localhost:3099/temp.html". But when my server gets the request and saves the path variable it is also saving the '/' along with the 'temp.html' when it is read in. How would I go about alleviating this issue. Thanks.
    The client *always* sends a / as first character of a URL (when there's no hostname). So what issue are you talking about?
    If you want to remove the slash, just ignore it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket Programming Problem!!!!
    By bobthebullet990 in forum Networking/Device Communication
    Replies: 2
    Last Post: 02-21-2008, 06:36 PM
  2. Client works on a LAN but don't send all the data
    By Niara in forum Networking/Device Communication
    Replies: 9
    Last Post: 01-04-2007, 03:44 PM
  3. Trouble using ArrayList
    By stevespai in forum C# Programming
    Replies: 12
    Last Post: 07-31-2006, 11:17 AM
  4. Instant messenger app help
    By AusTex in forum C Programming
    Replies: 2
    Last Post: 05-01-2005, 12:41 AM
  5. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21