By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,131 Members | 1,728 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,131 IT Pros & Developers. It's quick & easy.

The meaning of form action of form "r/sx/*-http://somehow/somescript"

P: n/a
When processing HTML-files for various purposes, I run into a strange
form action definition looking like

"r/sx/*-http://somehow/somescript"

In particular, the Yahoo search form uses a form action attribute which
looks like this.

What's the meaning of the "r/sx/*-"-prefix?

--
Aatu Koskensilta (aa**************@xortec.fi)

"Wovon man nicht sprechen kann, daruber muss man schweigen"
- Ludwig Wittgenstein, Tractatus Logico-Philosophicus

Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Aatu Koskensilta wrote:
When processing HTML-files for various purposes, I run into a strange
form action definition looking like

"r/sx/*-http://somehow/somescript"

In particular, the Yahoo search form uses a form action attribute which
looks like this.

What's the meaning of the "r/sx/*-"-prefix?


To go to ./r/sx/*- (which IIRC is some form of redirect script)

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

P: n/a
David Dorward wrote:
Aatu Koskensilta wrote:

When processing HTML-files for various purposes, I run into a strange
form action definition looking like

"r/sx/*-http://somehow/somescript"

In particular, the Yahoo search form uses a form action attribute which
looks like this.

What's the meaning of the "r/sx/*-"-prefix?

To go to ./r/sx/*- (which IIRC is some form of redirect script)


Ah. That seems sensible. Are there syntactical restrictions on the form
the scheme component of an URI can take? Otherwise "r/sx/*-http" could
name a (unregistered) scheme. I'll go check the relevant RFCs and file a
bug report on PHPs parse_url()-function (it seems to mistakenly think
"r/sx/*-http" is a scheme) in case the scheme is e.g. restricted to
consist only of alphabetical characters or something on the lines.

--
Aatu Koskensilta (aa**************@xortec.fi)

"Wovon man nicht sprechen kann, daruber muss man schweigen"
- Ludwig Wittgenstein, Tractatus Logico-Philosophicus

Jul 20 '05 #3

P: n/a
David Dorward wrote:
Aatu Koskensilta wrote:

Ah. That seems sensible. Are there syntactical restrictions on the form
the scheme component of an URI can take? Otherwise "r/sx/*-http" could
name a (unregistered) scheme.

===== rfc 2396 ==========

3. URI Syntactic Components

The URI syntax is dependent upon the scheme. In general, absolute
URI are written as follows:

<scheme>:<scheme-specific-part>

An absolute URI contains the name of the scheme being used (<scheme>)
followed by a colon (":") and then a string (the <scheme-specific-
part>) whose interpretation depends on the scheme.

=========================

http://www.ietf.org/rfc/rfc2396.txt

In URIs, the scheme is indicated by it ending in a colon. I believe the
colon in the above URI should be encoded as %3A


Probably yes. The RFC specifies the following grammar for <scheme>

<scheme> := alpha *( alpha | digit | "+" | "-" | "." )

I've added a check to see that a potential scheme conforms to this
grammar to my processing scripts.

Another very strange thing about the Yahoo web site is that as a result
of submitting a search query we get a 320 Found reply with the Location
header field having value

http://search/?p=searchstring&sub=Search&fr=fp-top

or something on the lines. I don't think this conforms to the HTTP/1.1
specification, which says that the Location-header field should contain
an absolute URL. Apparently browsers can guess what Yahoo means by this
but I'm at loss.

--
Aatu Koskensilta (aa**************@xortec.fi)

"Wovon man nicht sprechen kann, daruber muss man schweigen"
- Ludwig Wittgenstein, Tractatus Logico-Philosophicus

Jul 20 '05 #4

P: n/a
Aatu Koskensilta wrote:
David Dorward wrote:
Aatu Koskensilta wrote:

Ah. That seems sensible. Are there syntactical restrictions on the form
the scheme component of an URI can take? Otherwise "r/sx/*-http" could
name a (unregistered) scheme.


===== rfc 2396 ==========

3. URI Syntactic Components

The URI syntax is dependent upon the scheme. In general, absolute
URI are written as follows:

<scheme>:<scheme-specific-part>

An absolute URI contains the name of the scheme being used (<scheme>)
followed by a colon (":") and then a string (the <scheme-specific-
part>) whose interpretation depends on the scheme.

=========================

http://www.ietf.org/rfc/rfc2396.txt

In URIs, the scheme is indicated by it ending in a colon. I believe the
colon in the above URI should be encoded as %3A

Probably yes. The RFC specifies the following grammar for <scheme>

<scheme> := alpha *( alpha | digit | "+" | "-" | "." )

I've added a check to see that a potential scheme conforms to this
grammar to my processing scripts.

Another very strange thing about the Yahoo web site is that as a result
of submitting a search query we get a 320 Found reply with the Location
header field having value

http://search/?p=searchstring&sub=Search&fr=fp-top

or something on the lines. I don't think this conforms to the HTTP/1.1
specification, which says that the Location-header field should contain
an absolute URL. Apparently browsers can guess what Yahoo means by this
but I'm at loss.


Uhhuh. Just ignore this last bit of rambling. It turned out to be an
error on my part.

--
Aatu Koskensilta (aa**************@xortec.fi)

"Wovon man nicht sprechen kann, daruber muss man schweigen"
- Ludwig Wittgenstein, Tractatus Logico-Philosophicus

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.