[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Pulling My Hair Out With WEBrick!

James Gray

6/5/2005 3:57:00 AM

WEBrick and I are not getting along tonight. I'll throw out some
general questions here in a shameless attempt to beg help from people
smarter than me:

1. If I have a proc handler dealing with some events and I have a
FileHandler serving static content and I decide halfway through my
proc I want to hand off to the FileHandler, is there an easy way to
accomplish that (without using HTML redirects).

2. My proc looks for complex paths and builds content based on them,
I would rather show the player simple urls that mean the same thing
though. Is this possible? Put another way, if a request comes in
for /view/prototype/house.rhtml can I set the url of the response to /
house.rhtml in some way the browser would show it as this?

3. My main reason for asking the last question is handling relative
image loads. Is there some way to handle relative paths in the
response?

4. I've tried configurations without a FileHandler and I didn't even
pass a :DocumentRoot to the constructor, I then installed my own file
handling proc at "/". My proc does handle at least some of the
requests; however, it seems that it is not called for all of them.
For example, if the proc loads index.html and that page includes an
image, the GET request seems to bypass my proc. Why? What is
serving that image?

Thanks in advance for any tips you can pass along.

James Edward Gray II