xitiomet / placebohttp (http://openstatic.org/)

Embeded Http server for gcj/java applications. PlaceboHttp uses an automatic session management system, Treating each session as a HttpRequest queue.

Clone this repository (size: 135.2 KB): HTTPS / SSH
$ hg clone http://hg.openstatic.org/placebohttp
commit 19: 81f8f47a533a
parent 18: 00cf4ae79f6b
child 20: fc9e1983c2a0
Got swing interface working 100 percent default
xitiomet
9 months ago

 NB: This is not the latest revision. For the latest view, go to tip.

View at rev
placebohttp /
filename size last modified message
src  
www  
.hgignore 125 B 12 months ago Initial Commit for PlaceboHttp Library
Makefile 2.7 KB 9 months ago Got swing interface working 100 percent
README 293 B 10 months ago Made setup a little easier
compile.cmd 163 B 10 months ago Made setup a little easier
manifest.mf 25 B 10 months ago Addid support for windows builds

README

Placebo HTTP Server
-------------------

1. Setup
--------
For windows users....
open a command prompt to the folder
\> compile.cmd
\> java -jar placebohttp.jar --help

For linux users....
First install gcj4.3

$ make
$ ./placebohttp --help

For solaris users....
$ make jvm
$ java -jar placebohttp.jar --help


2. Usage
--------
Placebo is full of tons of odd features, and if you were to ask my rationale behind them
my answer would be, "because i needed them." Placebo is meant to be a quick and easy to
use swiss army knife of a webserver. 

Aside the command line options placebo handles certain kinds of files in a very special
way. These types are jar, war, ini, and zip. When it comes to the archive types placebo
allows you to traverse the contents of the archive as part of your url. So if you had a
file called stuff.zip in your webroot, and this file was filled with media you could do
the following...

http://127.0.0.1:8090/stuff.zip/images/someimage.jpg

Assuming that inside stuff.zip there was an images directory with someimage.jpg in it.
This functionality works the same for war, jar, and zip files.

What About INI Files?

Sadly this was one of the poorest cludges i ever made for the sake of quickly adding
proxies to an existing sever. INI files have a few things they can contain that placebo
will recognize as a traversable path. Imagine an ini file called google.ini that had the
following line.

proxy_url=http://www.google.com/

so if this file were located in your webroot you could do the following

http://127.0.0.1:8090/google.ini/

Also files with no extensions are assumed to be ini files so if you had renamed google.ini
to just google, you could have the following url

http://127.0.0.1:8090/google/

which would proxy googles homepage. Right now there are only two other proxy features.
buffered_proxy_url which will cause placebo to buffer the data before relaying it to
the client, and json_to_html_url which will take the json data of any target and render
it as pretty html.