Giter Site home page Giter Site logo

configure modifier failed. about martian HOT 3 CLOSED

google avatar google commented on May 5, 2024
configure modifier failed.

from martian.

Comments (3)

bramhaghosh avatar bramhaghosh commented on May 5, 2024

This is an issue with the main.go in https://github.com/netroby/gohttpproxy. It's not registering "martian.proxy/{path}" as a pattern in the http.DefaultServeMux. For an example of how to do that, refer to https://github.com/google/martian/blob/master/cmd/proxy/main.go#L402

Alternatively, just use https://github.com/google/martian/blob/master/cmd/proxy/main.go.

from martian.

bramhaghosh avatar bramhaghosh commented on May 5, 2024

The implementation in that main.go does not register martian.proxy a part
of the pattern in the servemux for config requests. Take a look at
https://github.com/google/martian/blob/master/cmd/proxy/main.go for an
example that does. Specifically the config function.

On Fri, Oct 21, 2016, 6:43 AM qianguozheng [email protected] wrote:

I am newbie to golang, and found
https://github.com/netroby/gohttpproxy.git this httpproxy using martian,
so I run it and with description in martian readme.md page, try to set
the modifier, but it is not work out, main reason is as below, there is no
martian.proxy in host,should I add it in hostname ?or what should I do
the make the set of modifiers work.

martian logs as below.


Request to http://martian.proxy/configure

POST http://martian.proxy/configure HTTP/1.1
Host: martian.proxy
Content-Length: 98
Accept: /
Content-Type: application/json
User-Agent: curl/7.49.1
Via: 1.1 martian
X-Forwarded-For: ::1
X-Forwarded-Host: martian.proxy
X-Forwarded-Proto: http

{ "header.Modifier": { "scope": ["response"], "name": "Test-Header", "value": "true" }}

2016/10/21 09:03:57 ERROR: martian: failed to round trip: dial tcp: lookup martian.proxy: no such host

2016/10/21 09:03:57 INFO:

Response from http://martian.proxy/configure

HTTP/1.1 502 Bad Gateway
Content-Length: 0
Warning: 199 "martian" "dial tcp: lookup martian.proxy: no such host" "Fri, 21 Oct 2016 09:03:57 GMT"


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#136, or mute the thread
https://github.com/notifications/unsubscribe-auth/AADI-et93qOnvwSvvHZlvxWKRxaNKc9_ks5q2BGmgaJpZM4Kcw7N
.

from martian.

qianguozheng avatar qianguozheng commented on May 5, 2024

Thanks @bramhaghosh

from martian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.