Closed Harusakii closed 1 year ago
long time no see @Harusakii
For the First thing:
You are right. See here: https://github.com/bogdanfinn/fhttp/blob/master/http2/transport.go#L810
I'm writing the Priority Header Frames before the WriteWindowUpdate
I will change that in 1.0.2 i guess as i just released 1.0.1.
Second Thing: Yes you are again right. This was a hardcoded value for Chrome see: https://github.com/bogdanfinn/fhttp/blob/master/http2/transport.go#L1379
I think we can change that to supply this priority object by the profile (and if none supplied we are using chrome default)
@Harusakii
I released https://github.com/bogdanfinn/tls-client/releases/tag/v1.1.0
It is now possible to optional set the header priority as you can see here for firefox: https://github.com/bogdanfinn/tls-client/blob/master/profiles.go#L340
If nothing is provided, then the default header priority is taken as before.
Also i changed the order the Header Frames are sent that WindowUpdate
is sent before the priority headers. See this example for verification:
https://github.com/bogdanfinn/tls-client/blob/master/example/main.go#L540
Haha, also great to see you still going strong @bogdanfinn ^^
I will look into the updates provided, but already thank you! Pretty fast haha ^^
Always good to bring customizability when stuff like that changes ;)
Hey @bogdanfinn!
It works haha ^^, one thing I am seeing though is that the stream ID on the headers frame is 1 even though it should be 15 (Firefox obv).
Then its perfect :)
I just did this and now it tracks the stream ID with the priorities to be sent, idk if its the best solution but it works haha:
for _, priority := range t.Priorities {
cc.fr.WritePriority(priority.StreamID, priority.PriorityParam)
cc.nextStreamID = priority.StreamID + 2
}
@Harusakii added your suggestion in https://github.com/bogdanfinn/tls-client/releases/tag/v1.1.1
Very nice ^^
Theres two things, first of all
this right here for firefox, on the normal browser its the second sent frame when using the firefox client and doing the same thing, then its the 8th frame sent
the second thing is, in the HEADERS frame sent, the priority on browser is this:
on the client it is this:
and idk where I could change that