tools/testserver/docs/urlmap
author flamingice@sourmilk.net
Wed, 18 Jul 2007 14:55:50 -0700
changeset 3643 1299a91e3916580803756cb32d8b38827597efce
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Bug 386002, Move tryToClose calls on shutdown - add nsCloseAllWindows.js to removed-files.in, r=benjamin

#
# Foo- Copy/Paste these 9 lines to generate new cases. 
#
START /foo
INCLUDE generic.res
Content-Type: text/html
CRLF
INCLUDE foo.html
END

#
# Cookie- A test with cookie header
#
START /cookie
INCLUDE generic.res
Content-Type: text/html
Set-Cookie: foo=bar
Date: Wed, 28 Jul 1999 17:00:01 GMT
CRLF
A test with Set-Cookie header foo=bar
END

#
# This is a simple multipart message example
# for more complicated stuff try "complex"
#
START /multi
INCLUDE generic.res
Content-Type: multipart/mixed; boundary=ComfortablyNumb
CRLF
--ComfortablyNumb
INCLUDE foo.html
CRLF
--ComfortablyNumb
INCLUDE bar.html
--ComfortablyNumb--
END

#
# Send the help file to see how this server is used. 
#
START /help
INCLUDE generic.res
CRLF
INCLUDE help.html
END 

#
# A more complex variation of multipart messaging.
# If this works, every code contributor to Necko
# gets a treat from me personally :) -Gagan
# 
START /complex
INCLUDE generic.res
Content-Type: multipart/mixed; boundary=TheWallFromPinkFloyd
CRLF
Preamble to multipart messages. Only clients that dont handle
multipart would see this!
CRLF
--TheWallFromPinkFloyd
Content-Type: text/plain
CRLF
	The Thin Ice
	Another Brick In The Wall-I
CRLF
--TheWallFromPinkFloyd
Content-Type: multipart/parallel; boundary=SideTwoOfTheWall
CRLF
--SideTwoOfTheWall
Content-Type: text/plain
CRLF
	Young Lust
	Goodbye Cruel World
CRLF
--SideTwoOfTheWall
Content-Type: text/plain
CRLF
	Another Brick In The Wall-II
--SideTwoOfTheWall--
CRLF
--TheWallFromPinkFloyd
Content-Type: text/plain
CRLF
	Another Brick In The Wall-III
--TheWallFromPinkFloyd--
CRLF
END

#
# Pragma: no-cache test
#
START /pragma
INCLUDE generic.res
Pragma: no-cache
Content-Type: text/html
CRLF
INCLUDE foo.html
END

#
# close: return a connection: close header
#
START /close
INCLUDE generic.res
Connection: Close
Content-Type: text/html
CRLF
INCLUDE foo.html
END

#
# Redirect testing
#
START /redirect
HTTP/1.1 301 Moved to a new location
Server: HTTP Test Server/1.1
Location: http://home.netscape.com/
Content-Type: text/html
CRLF
END

#
# Post example...
#
START /post
INCLUDE generic.res
Content-Type: text/html
CRLF
INCLUDE post.html
END

#
# Do other stuff with echoing the request as well... 
#
START /echo
INCLUDE generic.res
Content-Type: text/html
CRLF
<HTML>
<H2>Echo request example</H2>
<HR>
This should echo all the request headers-<BR>
<PRE>
ECHO
</PRE>
<HR>
This should echo only the user-agent header- (this is case sensitive!)<BR>
<PRE>
ECHO User-Agent
</PRE>
END