Re: [go-nuts] net/http: no Client API to close server connection based on Response #21978

2024-04-02 Thread Eli Lindsey
There isn’t a great way to handle this currently - we maintain out of tree patches to do something similar, though ours are h2 specific. The crux of the problem is that net currently lacks a usable connection pool API (there is some slightly newer discussion here, but it’s similar to the issue

Re: [go-nuts] net/http: no Client API to close server connection based on Response #21978

2024-04-02 Thread Robert Engels
My guess is that if you are getting a 500 you have exhausted the server or capacity. So close the client completely and perform an exponential back off. You can wrap all of this at a higher level to keep the synchronous behavior. On Apr 2, 2024, at 7:37 PM, Jim Minter wrote:That's possible, but

Re: [go-nuts] net/http: no Client API to close server connection based on Response #21978

2024-04-02 Thread Jim Minter
That's possible, but the rate of occurrence of the issue is low (but painful when it happens), and the costs of starting a new TLS connection for every HTTP request are significant. I'm looking for a better way. Jim On Tuesday 2 April 2024 at 15:01:30 UTC-6 Sean Liao wrote: > since you

Re: [go-nuts] net/http: no Client API to close server connection based on Response #21978

2024-04-02 Thread 'Sean Liao' via golang-nuts
since you already know the server is problematic, you could just set Close on the original request. On Tue, Apr 2, 2024, 15:29 Jim Minter wrote: > Hello, > > I was wondering if anyone had any ideas about > https://github.com/golang/go/issues/21978 ("net/http: no Client API to > close server

[go-nuts] net/http: no Client API to close server connection based on Response #21978

2024-04-02 Thread Jim Minter
Hello, I was wondering if anyone had any ideas about https://github.com/golang/go/issues/21978 ("net/http: no Client API to close server connection based on Response") -- it's an old issue, but it's something that's biting me currently and I can't see a neat way to solve it. As an HTTP

Re: [go-nuts] user process instruction pointer symbol lookup

2024-04-02 Thread Ian Lance Taylor
On Tue, Apr 2, 2024 at 2:35 AM 'TheDiveO' via golang-nuts wrote: > > On Linux, given an arbitrary binary executable with symbol information in the > executable, how can I lookup an instruction pointer address to get the > corresponding symbol name? > > The binary (and its process) isn't a Go

[go-nuts] Re: CMSSignedData in Golang

2024-04-02 Thread Tamás Gulácsi
Earlier questions bubbled up https://pkg.go.dev/github.com/fullsailor/pkcs7?utm_source=godoc#SignedData (https://github.com/smallstep/pkcs7) For the XML canonicalization, you may try https://pkg.go.dev/github.com/lafriks/go-xmldsig/v2#Canonicalizer Shivli Srivastava a következőt írta (2024.

[go-nuts] Enable Disable location Through Command Line or Script

2024-04-02 Thread Rahul Gupta
Hello, I am attempting to enable or disable the iOS location setting programmatically, similar to how we handle assistive touch enable/disable through Go script or command line. I am referring to this repository: https://github.com/danielpaulus/go-ios. However, I have tried to write similar

[go-nuts] CMSSignedData in Golang

2024-04-02 Thread Shivli Srivastava
I have to replicate the Java code for signing xml in Go. The java code uses org.bouncycastle.cms.CMSSignedData from BouncyCastle for signing and org.apache.xml.serialize.XMLSerializer for Serializing the input xml . The signing process should be exactly same as the signature otherwise would

[go-nuts] user process instruction pointer symbol lookup

2024-04-02 Thread 'TheDiveO' via golang-nuts
On Linux, given an arbitrary binary executable with symbol information in the executable, how can I lookup an instruction pointer address to get the corresponding symbol name? The binary (and its process) isn't a Go binary, but any arbitrary executable. The stack unwinding has already been