473,657 Members | 2,517 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 1723
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***@dontspam atrax.co.uk> wrote in message
news:OV******** ******@TK2MSFTN GP10.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**********@s pammotel.com> writing in
news:Of******** ******@TK2MSFTN GP10.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**********@s pammotel.com> writing in
news:#b******** ******@TK2MSFTN GP11.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**********@s pammotel.com> wrote in message
news:#b******** ******@TK2MSFTN GP11.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

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

Similar topics

3
11205
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) on the server because of that. Our site will have an SSL certificate next week, so I would like to use AIM instead of SIM, however, I don't know how to send data via POST over https and recieve data from the Authorize.net server over an https...
2
5801
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 to execute the code until the browser send his reply to the header instruction. So an exit(); after each redirection won't hurt at all
3
22994
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 field is completed.
0
8460
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. 354 roberto@ausone:Build/php-4.3.2> ldd /opt/php4/bin/php libsablot.so.0 => /usr/local/lib/libsablot.so.0 libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 libm.so.1 => /usr/lib/libm.so.1
1
8564
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 column below. The viewer can select states from the drop down lists above the other two columns as well. If the viewer selects only one, only one column fills. If the viewer selects two states, two columns fill. Etc. I could, if appropriate, have...
4
18252
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 user comes back to a page where he had a submitted POST data the browser keeps telling that the data has expired and asks if repost. How to avoid that? I tried registering all POST and GET vars as SESSION vars but
1
6810
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 http://www.mis.gla.ac.uk/biquery/training/ but each of the courses held have maximum of 8 people that could be
2
31391
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 to :parameter I dont like the idea of making the SQL statement on the fly without binding parameters as I dont want a highly polluted SQL cache.
3
23564
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 results of the picture half the size. The PHP I have installed support 1.62 or higher. And all I would like to do is take and image and make it fit a 3x3. Any suggestions to where I should read or look would be appreciated.
0
8827
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4158
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2731
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 we have to send another system
2
1957
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.