Misc. (#281)
* Logger * etag cache fix * xml refactor * whitespace * NodePathUtils * Http2
This commit is contained in:
1 parent
44ee6681c5
commit
f3aeb58b38
13 files changed
+104
-75
No files matched your search
@@ -174,7 +174,7 @@ namespace Http
|
||||
|
||||
function SetState(newState as Http.HttpConnectionState)
|
||||
if m.state <> newState
|
||||
LogDebug(m, "state change" + Stri(m.state) + " ->" + Stri(newState))
|
||||
LogDebug("state change" + Stri(m.state) + " ->" + Stri(newState))
|
||||
m.state = newState
|
||||
end if
|
||||
end function
|
||||
|
||||
@@ -58,11 +58,11 @@ namespace Http
|
||||
m.http_code = errcode
|
||||
|
||||
buffer = `<html><head><title>${errcode} ${errname}</title></head><body>
|
||||
<h1>${errname}</h1>
|
||||
${reason}
|
||||
<hr>
|
||||
${m.GeneratedBy()}
|
||||
</body></html>`
|
||||
<h1>${errname}</h1>
|
||||
${reason}
|
||||
<hr>
|
||||
${m.GeneratedBy()}
|
||||
</body></html>`
|
||||
|
||||
m.SetBodyDataString(buffer)
|
||||
m.ContentType("text/html")
|
||||
|
||||
@@ -11,6 +11,11 @@ namespace Http
|
||||
return false
|
||||
end if
|
||||
|
||||
cacheControl = response.headers["Cache-Control"]
|
||||
if IsString(cacheControl) and cacheControl.instr("no-cache") <> -1
|
||||
return false
|
||||
end if
|
||||
|
||||
etag = response.headers["ETag"]
|
||||
if not StringUtils.IsNullOrEmpty(etag)
|
||||
return false
|
||||
@@ -42,6 +47,11 @@ namespace Http
|
||||
return false
|
||||
end if
|
||||
|
||||
cacheControl = response.headers["Cache-Control"]
|
||||
if IsString(cacheControl) and cacheControl.instr("no-cache") <> -1
|
||||
return false
|
||||
end if
|
||||
|
||||
etag = response.headers["ETag"]
|
||||
if not StringUtils.IsNullOrEmpty(etag)
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user