More progress, more setbacks on klortho

I have a version of klortho that’s able to parse its PATH_INFO, grab the XML that’s located there, and apply the transformation that’s in the processing instruction, if such exists. That’s cool.

I’ve been using this to work with my python band name generator, and I can get random band names to show, and that’s really great, because I can use the needs I discover while working on this band name program to decide which as yet unimplemented parts of klortho I’ll need to implement, which brings us to my roadblock.

I’m writing the python script (called “Rate”) that will take in POSTed parameters to update the ratings for all the words in the previously displayed band name, and then redirect back to “Show”. klortho needs to do two things that it can’t do yet in order for this to work: it needs to understand POSTed data, and pass it to the sub-request, and it needs to recognize redirect status codes from the sub-request, and pass them back out, along with the appropriate headers.

I started small and modest. “Rate” just issues a redirect to “Show”. If you call the script directly, it works. Nothing I try in klortho will pass that redirect out. I run into a brick wall of of “500 Server Error”. The server error log reliably reports that FasctCGI is complaing that I’m sending incomplete headers. Is it a Dreamhost server config issue? What’s going on? What do I try next to learn more about what’s really happening?

I see two roads, and I may follow them both at the same time. I can create a little dummy FastCGI in c, that does nothing but issue hard-coded redirects. I’d leave out all the other things that klortho is doing, and tweak away at the stripped down version until I get it right, then put what I’ve come up with back into klortho. The other idea I’ve had is to write another version of klortho from scratch, and concentrate on acting as a fully transparent proxy, which will pass all the appropriate headers in and out, handle authentication and POST data and file uploads and any status code the sub-request might throw at it, and then add the XSLT transformations back into it.

  • Share/Bookmark
Post a Comment

You must be logged in to post a comment.