CGI-problem

Garry Steedman gs at styrax.com
Thu Jan 24 11:09:56 EST 2002


steve,

that would be octothorpe...
                       ^
                       |

http://hyperarchive.lcs.mit.edu/telecom-
archives/archives/history/octothorpe.the.real.story

pedantically yours,-)

garry

On 24 Jan 2002, at 9:36, Steve Holden wrote:

Send reply to:  	"Steve Holden" <sholden at holdenweb.com>
From:           	"Steve Holden" <sholden at holdenweb.com>
Subject:        	Re: CGI-problem
Organization:   	Holden Web
To:             	python-list at python.org
Date sent:      	Thu, 24 Jan 2002 09:36:34 -0500

> <olav.viken at kmss.no> wrote in message
> news:a2od3t$qr5$1 at oslo-nntp.eunet.no...
> > Hi!
> >
> > I'm having a problem passing the '#-character' to a cgi-script.
> >
> > The cgi script is invoked with a url as this:
> >
> > http:/myserver/script.py?link="T:/test.htm#Mark"
> >
> >
> >
> > Here part of my python-script
> >
> > import cgi,string,os
> >
> > all_values=cgi.FieldStorage()
> > link=all_values["link"].value
> > print link
> >
> > this will produce output:
> >
> > "T:/test.htm
> >
> >
> > So my question is:  How can I get the rest of the input string?
> 
> Further to Jason's and Joonas' posts, the *reason* for this apparently
> bizarre requirement is that any URL may end in a fragment beginning
> with an octothorp (pound sign, hash mark, call it what you will). Such
> a fragment is an instruction to the client to move to the location in
> the server's output stream (if any) containing an anchor with an
> appropriate NAME attribute.
> 
> In your case the browser is sending
> 
>     /script.py?link="T:/test.htm
> 
> as the URi in the request (look out, by the way: non-matching quotes
> after the truncation, and you forgot a slash after the "http:/" which
> was probably just a typo, then looking for
> 
>     <A NAME='Mark"'> ... </A>
> 
> in the output. If it doesn't find it, it will jut display the output
> from the beginning.
> 
> regards
>  Steve
> --
> Consulting, training, speaking: http://www.holdenweb.com/
> Python Web Programming: http://pydish.holdenweb.com/pwp/
> 
> 
> 
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list


+-------------------------------------------+
  Garry Steedman      mailto:gs at styrax.com  
  Styrax Associates  http://www.styrax.com/ 

  "The Good Man has no shape."            
+-------------------------------------------+




More information about the Python-list mailing list