Issues with /proxy/[port]/headers in beta 5

226 views
Skip to first unread message

hub

unread,
Mar 2, 2012, 7:06:51 PM3/2/12
to BrowserMob Proxy
The README says POST to this to change headers, but I get a 500
response

========================================================
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/
>
<title>Error 500 Exception [RuntimeException - "Unable to obtain input
stream from servlet request (was it already used or closed
elsewhere?). Error:
No content to map to Object due to end of input"] thrown by event
method [public com.google.sitebricks.headless.Reply
org.browsermob.proxy.bricks.ProxyResource.updateHeaders(int,com.google.sitebricks.headless.Request)]

at com.google.sitebricks.SitebricksInternalModule
$1$1.as(SitebricksInternalModule.java:107)
(See below for entire trace.)
</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /proxy/13675/headers. Reason:
<pre> Exception [RuntimeException - "Unable to obtain input stream
from servlet request (was it already used or closed elsewhere?).
Error:
No content to map to Object due to end of input"] thrown by event
method [public com.google.sitebricks.headless.Reply
org.browsermob.proxy.bricks.ProxyResource.updateHeaders(int,com.google.sitebricks.headless.Request)]
at com.google.sitebricks.SitebricksInternalModule
$1$1.as(SitebricksInternalModule.java:107)
(See below for entire trace.)
</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>
==================================================

A lot of the commit messages say

hub

unread,
Mar 2, 2012, 7:08:44 PM3/2/12
to BrowserMob Proxy
Oops - sent too early.

I saw in the commit messages that you should PUT to this resource, but
that gives me the following error:

=======================
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/
>
<title>Error 500 Sitebricks received a null reply from the resource.</
title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /proxy/9102/headers. Reason:
<pre> Sitebricks received a null reply from the resource.</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>
======================================


Thoughts?

Thanks

Patrick Lightbody

unread,
Mar 10, 2012, 8:38:21 PM3/10/12
to browserm...@googlegroups.com
Can you get me a simple test case and then I will look in to it.

--
Patrick Lightbody



webtester

unread,
Apr 29, 2012, 5:18:15 AM4/29/12
to BrowserMob Proxy
Hi,

I'm using Beta 6:

curl -X POST -d '{"Proxy-Authentication" : "Basic ertgd"}'
http://localhost:9090/proxy/9091/headers

Gives:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/
>
<title>Error 500 Exception [RuntimeException - "Unable to obtain input
stream from servlet request (was it already used or closed
elsewhere?). Error:
No content to map to Object due to end of input"] thrown by event
method [public com.google.sitebricks.headless.Reply
org.browsermob.proxy.bricks.ProxyResource.updateHeaders(int,com.google.sitebricks.headless.Request)]

at com.google.sitebricks.SitebricksInternalModule
$1$1.as(SitebricksInternalModule.java:107)
(See below for entire trace.)
</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /proxy/9091/headers. Reason:
<pre> Exception [RuntimeException - "Unable to obtain input stream
from servlet request (was it already used or closed elsewhere?).
Error:
No content to map to Object due to end of input"] thrown by event
method [public com.google.sitebricks.headless.Reply
org.browsermob.proxy.bricks.ProxyResource.updateHeaders(int,com.google.sitebricks.headless.Request)]

at com.google.sitebricks.SitebricksInternalModule
$1$1.as(SitebricksInternalModule.java:107)
(See below for entire trace.)
</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>



</body>
</html>


Did I make a mistake ?

Setting a new pageRef and getting the Har works fine!

Roy

webtester

unread,
May 8, 2012, 2:52:45 PM5/8/12
to BrowserMob Proxy
It's a pity that nobody give a response.

R

webtester

unread,
Aug 27, 2012, 6:34:34 AM8/27/12
to browserm...@googlegroups.com
still nobody ?

markomannux

unread,
Aug 29, 2012, 2:04:01 AM8/29/12
to browserm...@googlegroups.com
Hi, I think you need to add these two parameters to your curl invocation:

-H "Content-disposition:json/application" - H "Content-type:json/application"

I receive a 200 OK status code. However, nothing seems to happen on the proxy, and my custom headers don't seem to be added to request. Any clue?
Reply all
Reply to author
Forward
0 new messages