Sha256: 3d9242fcf2ef18edc0eb21cd0ac34c600aceda7cfed8d844a4436ce027225c45

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

<h1>Parse HTTP Parameters</h1>
 
<p>Enter an HTTP request, like the ones you can capture using the
<a href='https://addons.mozilla.org/en-US/firefox/addon/3829'>LiveHTTPHeaders</a> addon for
<a href='http://www.mozilla.com/en-US/firefox/'>Firefox</a>.
</p>
 
<form action='<%= uri(:http) %>' method='post'>
<textarea rows='20' cols='60' name='http'></textarea>
<br/>
<input type='checkbox' name='keep_content' value='true' checked='true'> Keep File Content
<input type='submit' value='Parse'>
</form>
 
<p>Note the request must be properly formated. For example:</p>
 
<pre>
GET / HTTP/1.1
Host: tap.rubyforge.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
</pre>

<p>Proper formatting for POST requires an empty line between the headers and body.
Without it you get a WEBrick::HTTPStatus::BadRequest error.</p>
 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tap-mechanize-0.6.0 views/tap/mechanize/capture/http.erb
tap-mechanize-0.5.1 views/tap/mechanize/capture/http.erb
tap-mechanize-0.5.0 views/tap/mechanize/capture/http.erb