Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't set headers #6

Open
AndrewRayCode opened this issue Sep 5, 2013 · 1 comment
Open

can't set headers #6

AndrewRayCode opened this issue Sep 5, 2013 · 1 comment

Comments

@AndrewRayCode
Copy link

proxy.start(function(err, data) {
    proxy.startHAR(data.port, 'test', function(err, resp) {
        proxy.doReq('POST', '/proxy/8080/headers', JSON.stringify({'User-Agent': 'iPhone' }), function(err, newData) {

oh boy

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Exception [NullPointerException - "null"] thrown by event method [public com.google.sitebricks.headless.Reply net.lightbody.bmp.proxy.bricks.ProxyResource.updateHeaders(int,com.google.sitebricks.headless.Request)]

at net.lightbody.bmp.proxy.bricks.ProxyResource.updateHeaders(ProxyResource.java:149)
(See below for entire trace.)
</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /proxy/8080/headers. Reason:
<pre>    Exception [NullPointerException - "null"] thrown by event method [public com.google.sitebricks.headless.Reply net.lightbody.bmp.proxy.bricks.ProxyResource.updateHeaders(int,com.google.sitebricks.headless.Request)]

at net.lightbody.bmp.proxy.bricks.ProxyResource.updateHeaders(ProxyResource.java:149)
(See below for entire trace.)
</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
@takyam-git
Copy link

try proxy.doReq('POST', '/proxy/' + data.port + '/headers', ...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants