Open scopdrag opened 6 years ago
@scopdrag what happens if you try the basic example proxy and make the request? https://github.com/elazarl/goproxy/tree/master/examples/goproxy-basic
Also, have you tried to request other sites with your proxy? What happens then?
Hey @rtuin,
Thanks for your kind attention.
Tried with basic proxy. Getting same issue. Yes i have tried with other sites too . Mainly this issue has been found in wordpress sites (Served using MAMP server). However same is working in desktop browser fine.
package main
import (
"github.com/elazarl/goproxy"
"log"
"flag"
"net/http"
)
func main() {
verbose := flag.Bool("v", false, "should every proxy request be logged to stdout")
addr := flag.String("addr", ":32001", "proxy listen address")
flag.Parse()
proxy := goproxy.NewProxyHttpServer()
proxy.Verbose = *verbose
log.Fatal(http.ListenAndServe(*addr, proxy))
}
So the outcome depends on the browser? This usually tells us that the response body isn't 100% what the HTTP headers say it is. For example, it may tell that the Content-Length value is > then the length in the body.
Hi All,
Getting "ERR_INCOMPLETE_CHUNKED_ENCODING issue" issue with many of the sites. e.g: http://www.sustainablesites.org/
I am using following code to expose the proxy server. I am using this proxy server with emulators (Android), When I test these websites without proxy it works fine.
Using this for proxy setttings:
Android/sdk/emulator/emulator @Nexus_5X_API_24 -http-proxy http://127.0.0.1:32001
But after setting proxy it throws me
ERR_INCOMPLETE_CHUNKED_ENCODING
errorPlease find the screenshot attached below.
your prompt attention will be greatly appreciated @insp3ctre , @fredcy @fastest963 @mlbright @sandrogauci @rtuin @jnormington
` package main import ( "log" "net/http" "fmt" "strings" "io/ioutil" "bytes" "gopkg.in/elazarl/goproxy.v1" ) func main() { proxy := goproxy.NewProxyHttpServer() proxy.OnRequest(goproxy.UrlHasPrefix("10.0.2.2")).DoFunc( func(r http.Request, ctx goproxy.ProxyCtx) (http.Request, http.Response) { url := r.URL.String() url = strings.Replace(url, "10.0.2.2", "localhost", 1) fresp, ferr := http.Get(url) println(ferr) return r, fresp
}`
Thanks,