# How can I view HTTP trace on an incoming request?

**URL:** <https://www.ruby-forum.com/t/how-can-i-view-http-trace-on-an-incoming-request/87574>\
**Category:** Rails\
**Created:** [March 4, 2007, 2:32am UTC](https://www.ruby-forum.com/t/how-can-i-view-http-trace-on-an-incoming-request/87574 "2007-03-04T02:32:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [March 4, 2007, 2:32am UTC](https://www.ruby-forum.com/t/how-can-i-view-http-trace-on-an-incoming-request/87574/1 "2007-03-04T02:32:16Z")

</div>

Hi,

how can I view HTTP trace on an incoming request? I am sending test  
HTTP  
requests from my test application (app1) to my actually application  
(app2)  
but I am getting Recognition failed errors? There is nothing in the  
app2  
logs.

Greg

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [March 4, 2007, 3:39am UTC](https://www.ruby-forum.com/t/how-can-i-view-http-trace-on-an-incoming-request/87574/2 "2007-03-04T03:39:20Z")

</div>

Hi Greg,

Greg H. wrote:

> how can I view HTTP trace on an incoming request?

Not sure exactly what you mean by ‘trace’ here. Are you using the ‘Live  
HTTP Headers’ plugin for FF? If so, what info is it not giving you that  
you  
need?

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [March 4, 2007, 12:22pm UTC](https://www.ruby-forum.com/t/how-can-i-view-http-trace-on-an-incoming-request/87574/3 "2007-03-04T12:22:48Z")

</div>

Live headers doesn’t seem to be an option as I want to trace/capture the  
HTTP from my App1 (a stub) to App2 (my application). So its App1 making  
the  
HTTP call to App2, not my browser.

My problem is (if anyone can help) that:

1. when I call an action in App2 from App1 I get a ROUTING ERROR,  
“Recognition failed for /mycontroller/myaction” - this seems to come  
from  
App2’s inbuilt Rails framework which somehow sees a routing problem  
and  
immediately sends back a “Routing Error” message without ever getting  
to my  
code within App2.
2. when I use the browser with same "  
[http://localhost:3000/mycontroller/myaction](http://localhost:3000/mycontroller/myaction)" URL (i.e. that App1  
seems  
to be correctly producing, although I don’t have a HTTP trace  
mechanism to  
100% prove this) App2 seems to work fine
3. again I don’t see any log info turn up in App2 (as if the rails  
framework picked up on the routing error first and then bounced it  
prior to  
my code getting involved)
4. some details of my code below

Code Used (which resides in App1 running on port 3001 - it’s calling  
App2  
running on port 3000)  
url = “[http://localhost:3000/mycontroller/myaction](http://localhost:3000/mycontroller/myaction)”  
uri = URI.parse(url)  
response = nil  
Net::HTTP.start(uri.host, uri.port) do |request|  
response = request.post(uri.path, postData)  
end

Note that “response.body” here gives:

 Action Controller: Exception caught \<\>
# Routing Error

```
Recognition failed for 
"/mycontroller/myaction"
```

Browser Test

- Yet when I call the same URL from my browser it works (and doesn’t  
give  
this message). The URL I use here would be:  
[http://localhost:3000/mycontroller/myaction](http://localhost:3000/mycontroller/myaction)

Any ideas/help? I can’t seem to see what I’m doing wrong. Any way to  
trace  
the HTTP coming directly into App2 to see for myself what Rails is  
doing?  
What about a way to turn up the logging/trace for rails re HTTP?

Thanks in advance  
Greg  
(TextEdit / MacBook)

On 3/4/07, Bill W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> you  
> need?
> 
> Best regards,  
> Bill

Hi,

how can I view HTTP trace on an incoming request? I am sending test  
HTTP  
requests from my test application (app1) to my actually application  
(app2)  
but I am getting Recognition failed errors? There is nothing in the  
app2  
logs.

Greg
