473,503 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is this ok?

Ken
Is this url ok?
Is it ok to have %20 in your url's??
ftp://www.******.com/Index/Code%20Sa...ode%20Samples%
20For%20Visual%20Basic/Search%20Spider.zip

Where ever I had a space in hte file name it now shows
a "%20" in the url, I can easly replace the space with
a "_" insted, should I or is it of like it is???

I don't know give me sone feed back on the %20 crap seams
to work fine with IIS 6.0...
Jul 19 '05 #1
11 1716
Spaces are not allowed in URLs (along with several other characters) -
please check the HTTP specification (or use google). Instead, they need to
be encoded, their encoded value is %20

Cheers
Ken

"Ken" <Ih*******@spam.com> wrote in message
news:11****************************@phx.gbl...
: Is this url ok?
: Is it ok to have %20 in your url's??
: ftp://www.******.com/Index/Code%20Sa...ode%20Samples%
: 20For%20Visual%20Basic/Search%20Spider.zip
:
: Where ever I had a space in hte file name it now shows
: a "%20" in the url, I can easly replace the space with
: a "_" insted, should I or is it of like it is???
:
: I don't know give me sone feed back on the %20 crap seams
: to work fine with IIS 6.0...
Jul 19 '05 #2
it's OK, but better avoided - the HTTP spec means spaces must be
replaced with %20 in order to keep a URL contiguous and not confuse the
client or server unduly. best not to leave spaces in filenames if you
ask me

________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
"Atrax" <at***@dontspamatrax.co.uk> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
: it's OK, but better avoided - the HTTP spec means spaces must be
: replaced with %20 in order to keep a URL contiguous and not confuse the
: client or server unduly.

No server will understand an request for a URI with a space in it.

AFAIK The only browser where spaces "work" is Internet Explorer, and this is
only because IE automagically encodes the spaces for you before it sends the
request out to the server.

Cheers
Ken
Jul 19 '05 #4
"Ken Schaefer" wrote:

AFAIK The only browser where spaces "work" is Internet Explorer,
and this is only because IE automagically encodes the spaces for
you before it sends the request out to the server.


The following browsers all encode the space. I cannot speak for others, but
I think it's safe to say anything with a version > 5 does the job:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.11 [en]
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET
CLR 1.0.3705)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5a) Gecko/20030728
Mozilla Firebird/0.6.1
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #5
Gazing into my crystal ball I observed "Dave Anderson"
<GT**********@spammotel.com> writing in
news:Of**************@TK2MSFTNGP10.phx.gbl:
"Ken Schaefer" wrote:

AFAIK The only browser where spaces "work" is Internet Explorer, and
this is only because IE automagically encodes the spaces for you
before it sends the request out to the server.


The following browsers all encode the space. I cannot speak for others,
but I think it's safe to say anything with a version > 5 does the job:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.11 [en]
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322;
.NET CLR 1.0.3705)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5a) Gecko/20030728
Mozilla Firebird/0.6.1


What about other browsers or devices? Isn't it preferable to just not use
spaces in file naming conventions than have some browser and/or device
fail?

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #6
"Adrienne" wrote:
AFAIK The only browser where spaces "work" is Internet Explorer...


The following browsers all encode the space...


What about other browsers or devices? Isn't it preferable to just
not use spaces in file naming conventions than have some browser
and/or device fail?


Possibly, but I wasn't passing judgment. I was merely responding to the
quoted text.

I admit I am a bit conflicted on the issue, however.

On one hand, I recognize that many of us have content that is managed by
contributors, some of whom are ignorant of -- or simply ignore -- these file
naming conventions. I don't want to police my contributors and I simply
don't care that much about the user with a vintage 1997 browser. To him, the
web is a stream of broken or crippled pages anyway.

On the other hand, I almost always defer to standards. And RFC1738 declares
URLs with spaces to be "unsafe".
http://www.ietf.org/rfc/rfc1738.txt

I personally have never used spaces in URLs. But I can't bring myself to
criticize those who do.

One further point to ponder -- the HTML spec warns users to always consider
URIs as case-sensitive, but this seems to be ignored with equal zeal.
http://www.w3.org/TR/html4/types.html#type-uri

Progress?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #7
Gazing into my crystal ball I observed "Dave Anderson"
<GT**********@spammotel.com> writing in
news:#b**************@TK2MSFTNGP11.phx.gbl:
"Adrienne" wrote:
AFAIK The only browser where spaces "work" is Internet Explorer...

The following browsers all encode the space...
What about other browsers or devices? Isn't it preferable to just
not use spaces in file naming conventions than have some browser
and/or device fail?


Possibly, but I wasn't passing judgment. I was merely responding to the
quoted text.

I admit I am a bit conflicted on the issue, however.

On one hand, I recognize that many of us have content that is managed
by contributors, some of whom are ignorant of -- or simply ignore --
these file naming conventions. I don't want to police my contributors
and I simply don't care that much about the user with a vintage 1997
browser. To him, the web is a stream of broken or crippled pages
anyway.


One can always provide instructions for the user, or reject a contribution
if it doesn't fall within your accepted naming conventions.

I actually wasn't talking about people with vintage browsers. I was
talking about people with other kinds of devices, telephones, things that
haven't been invented yet, etc.

On the other hand, I almost always defer to standards. And RFC1738
declares URLs with spaces to be "unsafe".
http://www.ietf.org/rfc/rfc1738.txt
Thanks for posting that. I read it and it corrected a misconception I had.
I was under the impression that dashes in file names were unsafe as well,
but apparently they are not, and some search engines seem to be able see
keywords in URIs like www.example.com/hotels-paris-france.asp.

I personally have never used spaces in URLs. But I can't bring myself
to criticize those who do.

One further point to ponder -- the HTML spec warns users to always
consider URIs as case-sensitive, but this seems to be ignored with
equal zeal. http://www.w3.org/TR/html4/types.html#type-uri

Progress?


Hey, I'm lazy, and I'm sure that my Shift keys have some other, more grand
purpose in the scheme of life.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #8
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:#b**************@TK2MSFTNGP11.phx.gbl...
I personally have never used spaces in URLs. But I can't bring myself to criticize those who do.
Hey for a "buck" and a bottle of cold Pepsi I will!.....stand back
everybody! :-)
One further point to ponder -- the HTML spec warns users to always consider URIs as case-sensitive, but this seems to be ignored with equal zeal. http://www.w3.org/TR/html4/types.html#type-uri


By what means do the contributors contribute? Maybe there is a way to
filter/reject things that aren't formated properly and distribute
instructions for the proper way to contribute. The problem isn't
going to go away if you don't do something to prevent it.
--

Phillip Windell [CCNA, MVP, MCP]
pw******@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com
Jul 19 '05 #9
"Phillip Windell" wrote:

By what means do the contributors contribute? Maybe there
is a way to filter/reject things that aren't formated
properly and distribute instructions for the proper way
to contribute. The problem isn't going to go away if you
don't do something to prevent it.


Who said it was a problem? It bothers me to no extent whatsoever. As I said,
I choose not to police contributors.

The determination that a URL is not well-formed seems to be an arbitrarily
drawn conclusion. Spaces are certainly allowed in quoted attributes, if not
in URLs. But if

http://xx.com/my file.xxx

is an invalid URL and

http://xx.com/my%20file.xxx

is valid, and furthermore

"http://xx.com/my file.xxx"

is a valid HTML attribute value (because it is simple quoted text), should
it not be the responsibility of the browser to apply the proper encoding to
the attribute value when choosing to use it as a URL? The web server, after
all, has the responsibility for the reciprocal mapping to the original
filename (the one with the space included).

FWIW, I note that as I typed this, my NG client identified the quoted
attribute as a URL spanning the space, but not the unquoted example. This
perfectly illustrates my point. Once the text is put into context (in this
case, to be treated as a URL), the client, which happens not to be a
browser, properly encodes the text.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #10
Gazing into my crystal ball I observed "Dave Anderson"
<GT**********@spammotel.com> writing in
news:#u**************@TK2MSFTNGP10.phx.gbl:
FWIW, I note that as I typed this, my NG client identified the quoted
attribute as a URL spanning the space, but not the unquoted example.
This perfectly illustrates my point. Once the text is put into context
(in this case, to be treated as a URL), the client, which happens not
to be a browser, properly encodes the text.


Well, that may be well and good for Outlook Express, but it certainly does
not work for me.

"http://www.example.com/my file.htm" is underlined as far as my, and no
farther.

Additionally, when I send myself a message to my web mail account, it also
understands until the my and no farther.

However, using the %20 in place of the space will resolve, although there
is no such file at www.example.com .

Not everyone uses Outlook Express.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #11
"Adrienne" wrote:

Not everyone uses Outlook Express.


That's immaterial to my point. Context should be what matters. Do you know
of a browser or device that interprets HTML, but disallows spaces in quoted
attribute values?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11177
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
5773
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
22956
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
8431
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
8535
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
18214
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
6776
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
31340
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
23531
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.