This post is such a big deal for me. After about 10 years of lamenting the limitations of Post Test Server, I’ve finally released a new version, Post Test Server V2. I talk more about it on the site, but the high level story is that the old version had a lot of drawbacks. People couldn’t delete their content, it wasn’t flexible enough, and it did not checking before saving the dumps so once botnets found it the cost to run the service became untenable. This new version has been rewritten in Go and is hosted on Google App Engine. Check it out: http://ptsv2.com.
Over the years a lot of people asked me for the source for Post Test Server. I didn’t share it because I was embarrassed that I wrote something in PHP (even if it was 15 years ago) and it was literally just dumping the values of some post variables so it didn’t seem worthwhile. But, now that I have a real replacement service I feel less bad sharing this:
This site didn’t have media on it so I dug up some photos taken by Josh Sweeney at Shoot For Details from a track day in the rain at Palmer Motorsports Park with my car and car from Ace Performance. This is quickly becoming my favorite track, not just on the east coast but of any track I have ever been to. The combination of elevation and blind apex turns make this track a treat.
The fact that I am getting feature requests means people are actually using my post test server. This makes me happy :) The most recent thing people asked for was multipart/form-data uploads. As an example for this behavior see my test form (which was submitted by a user who was super helpful).
Update:This poor post has been imported from blog to blog over the years and as a result this code snippet has been horribly maimed and will not be formatted. C’est la vie.
Today, the system worked! I received an email from a user asking if I could add support for custom status codes to Post Test Server and I was happy to oblige. So I have added a new parameter which can be passed in the URL called: status_code which causes the server to return a response with the header set to: HTTP/1.0 $status Custom Status (where $status is the value of status_code). Regardless of what code is requested the post will still be dumped in folder in the usual way.
To my great surprise, people have actually started using it! I also found myself using it more and more in my own debugging and so I have added two features which further my original mission of maximizing this project’s value to effort ratio. Total effort is still under one hour.
Now dumps all Header parameters. Previously I was only dumping the ones that I thought relevant. Now you can see carrier and ISP inserted fields as well.
This past week I found myself writing code that had to submit some data to a webservice via an HTTP POST request. Not a particularly difficult task but it was on a platform I didn’t have much experience with and I wasn’t sure if I had formed the packet properly. In order to validate my bits I wrote a small php page which accepts POST requests and dumps them locally. Thanks to Dreamhost I’m now able to share this with everybody: