fix: fixed a bug which caused response body overrides from proxy modules to not work correctly in some cases (fixes #209)

This commit is contained in:
evilsocket 2018-03-27 12:33:44 +02:00
commit 1f8e97d91f
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -64,10 +64,14 @@ func (j *JSResponse) UpdateHash() {
}
func (j *JSResponse) WasModified() bool {
// body was read
if j.bodyRead == true {
// body was read
return true
} else if j.Body != "" {
// body was not read but just set
return true
}
// check if any of the fields has been changed
newHash := j.NewHash()
if newHash != j.refHash {