--- Comment #20 from Philippe Verdy <> 2010-10-02 21:21:42 
UTC ---
That was not the purpose of my message. Actually it ALREADY works with the raw
Ethernet protocol, when the web server is already configured to accept this
protocol, and PHP works as a slave server (it does not directly access to the
protocol which is only controled by the webserver).

But what I wanted to say is that the RFC-described syntax of URIs still applies
and that MediaWiki should just comply to the most generic syntax of URIs. Minor
patches are needed (this is much more complex for supporting the raw sockets in
PHP itself, or in the webserver, due to evident security issues or conflicts
with binding of IP and ICMP protocols into other OS kernel drivers that will
restrict their use.

Yes $wgServer may contain a colon, but only after parsering
$_SERVER[SERVER_NAME] before appending $_SERVER[SERVER_PORT] with an
intermediate colon.

The blackboxing will occur when handling $_SERVER[SERVER_NAME] only (which
should then never be used elsewhere in the MediaWiki's PHP code).

For Ethernet (this was just an example) you would have found:
$_SERVER[SERVER_NAME]="C000:0000:0000" and
$_SERVER[SERVER_PORT]="9999:99" (i.e. the port may not be just an integer, here
it indicates a protocol number and an optional port, as supported by the
underlaying protocol handler, out of the Ethernet handler itself).

All that needs to be done is to put the SERVER_NAME between brackets, what you
get is [C000:0000:0000] and it looks very similar to an IPv6 hostname, except
that it uses a shorter bit pattern (with 3 and only 3 grouos of hex numbers),
so there's no confusion with an IPv6 hostname (which would require extra

In that case $wgServerName will be "[C000:0000:0000]:9999:99", and you can
build the HTTP protocol on top of it (HTTP is not restricted to IP transport
only, it just depends on an unspecified underlying reliable bididirectional
end-to-end transport layer, for example TCP, or even UDP in some cases where it
may be reliable, or some other transport protocol built on top of UDP, or a
serial link, or a named pipe, or an Unix pipe, or any kind of interprocess
communication channel, but not IP-Multicast because it is not end-to-end)

All the syntaxes that allow creating a valid URI from protocol specified,
hostnames, port numbers, or transport options should be specifiable in
$wgServerName (because it's not up to MediaWiki to control these options, but
to the webserver hosting or relaying PHP. Mediawiki can perfectly be
protocol-agnostic, it just has to assume that the underlying protocol will
support any kind of hierarchic URI schemes.

That's why the server APIs gave you the $_SERVER array: these variables are not
meant to be simplified in a single $wgServerName, but if you do that, you have
to take precaution so that the transform from $_SERVER[] to $wgServerName
remains bijective (within the allowed limits of URI RFCs).

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to