mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
db9a1f6dab
Before this patch, we would only set these pragmas as part of CreateSchema which runs in SetupAction. This meant that the connection used to perform other DBActions would not have had these pragmas applied. As a result, sqlite would not honor foreign keys on such connections, so the cascade delete rules responsible for deleting rows from request_headers and response_headers would not get executed when DBSchema::CachePut deleted the old entry before adding a new one. The test in the patch demonstrates how this could result in an observable breakage. Before this patch, the response headers stored in the cache for the overwritten entry would reflect both `Mirrored: `foo' and `Mirrored: bar' headers, which means that attempting to get this header on the cached response would return the first entry, `foo'.
6 lines
214 B
JavaScript
6 lines
214 B
JavaScript
function handleRequest(request, response) {
|
|
response.setStatusLine(request.httpVersion, 200, "OK");
|
|
response.setHeader("Mirrored", request.getHeader("Mirror"));
|
|
response.write(request.getHeader("Mirror"));
|
|
}
|