C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 02-25-2009, 02:58 PM   #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.
NuNn is offline   Reply With Quote
Old 02-25-2009, 03:34 PM   #2
Registered User
 
Join Date: Oct 2008
Posts: 528
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.
EVOEx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 09:13 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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