Closed hanshenrik closed 6 years ago
You're right, identical req
should match existing tapes. meta
and res
are not taken into account during the lookup.
Looking at the image I don't see any reason why the tape shouldn't match.
If you're willing to test, I published a new version talkback@beta
that adds a debug
option.
Set it to true
, and it will print a lot of debug information.
For each saved tape, it will print the reason why it doesn't match a new request.
Thank you
I think I found the bug that makes this happen.
The response for this tape is not considered human readable (meta.resHumanReadable=false
) because header value for "content-encoding" is gzip. The request is on the other side considered human readable, which is correct.
In the source file tape.js
the method static fromStore(raw, options)
checks on the var raw.meta.resHumanReadable
for both if
tests. The first if
test is used for the request and has a bug is on line 22, where it should test the raw.meta.reqHumanReadable
instead.
You're totally right @roypa! Thank you so much.
I just released 1.2.0
that fixes this issue.
Great! Thank you so much for such a quick response.
Yes, great stuff! Thanks!
Talkback keeps generating new cached responses after server restart even though the requests are identical. I thought the expected behaviour was that identical requests would cause the cached response to be returned.
I'm guessing differences in
meta
andres
shouldn't cause a new cached response to be generated?