xitiomet is sharing code with you
Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.
Don't show this againplacebohttp overview
Recent commits See more »
| Author | Revision | Comments | Message | Labels | Date |
|---|---|---|---|---|---|
|
|
24bcde817c29 |
merges |
|
||
|
|
9e6ab8ab1d73 |
keystore timeout |
|
||
|
|
400f90c8aa46 |
logger 2.0 |
|
||
|
|
45513e8a4d40 |
interactive response fix |
|
||
|
|
41d9c6df6f85 |
interactive response |
|
Placebo HTTP Server ------------------- 1. Setup -------- ==> Windows users.... open a command prompt to the folder \> compile.cmd \> java -jar placebohttp.jar --help ==> Linux users.... First install gcj4.3 $ make $ ./placebohttp --help ==> Solaris users.... $ make jvm $ java -jar placebohttp.jar --help ==> OSX users..... $ make osx $ open PlaceboHTTP.app 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.