mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
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:
parent
a1875e45a2
commit
1f8e97d91f
1 changed files with 5 additions and 1 deletions
|
@ -64,10 +64,14 @@ func (j *JSResponse) UpdateHash() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j *JSResponse) WasModified() bool {
|
func (j *JSResponse) WasModified() bool {
|
||||||
// body was read
|
|
||||||
if j.bodyRead == true {
|
if j.bodyRead == true {
|
||||||
|
// body was read
|
||||||
|
return true
|
||||||
|
} else if j.Body != "" {
|
||||||
|
// body was not read but just set
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if any of the fields has been changed
|
// check if any of the fields has been changed
|
||||||
newHash := j.NewHash()
|
newHash := j.NewHash()
|
||||||
if newHash != j.refHash {
|
if newHash != j.refHash {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue