mirror of https://github.com/adamdruppe/arsd.git
more stuff
This commit is contained in:
parent
55e8972e81
commit
e442e61a59
16
cgi.d
16
cgi.d
|
@ -572,7 +572,7 @@ class Cgi {
|
||||||
responseLocation = uri.strip;
|
responseLocation = uri.strip;
|
||||||
isCurrentResponseLocationImportant = important;
|
isCurrentResponseLocationImportant = important;
|
||||||
}
|
}
|
||||||
private string responseLocation = null;
|
protected string responseLocation = null;
|
||||||
private bool isCurrentResponseLocationImportant = false;
|
private bool isCurrentResponseLocationImportant = false;
|
||||||
|
|
||||||
/// Sets the Expires: http header. See also: updateResponseExpires, setPublicCaching
|
/// Sets the Expires: http header. See also: updateResponseExpires, setPublicCaching
|
||||||
|
@ -654,10 +654,7 @@ class Cgi {
|
||||||
|
|
||||||
private string[] customHeaders;
|
private string[] customHeaders;
|
||||||
|
|
||||||
/// Writes the data to the output, flushing headers if they have not yet been sent.
|
void flushHeaders(const(void)[] t, bool isAll = false) {
|
||||||
void write(const(void)[] t, bool isAll = false) {
|
|
||||||
assert(!closed, "Output has already been closed");
|
|
||||||
if(!outputtedResponseData && (!autoBuffer || isAll)) {
|
|
||||||
string[] hd;
|
string[] hd;
|
||||||
// Flush the headers
|
// Flush the headers
|
||||||
if(responseStatus !is null) {
|
if(responseStatus !is null) {
|
||||||
|
@ -741,6 +738,13 @@ class Cgi {
|
||||||
outputtedResponseData = true;
|
outputtedResponseData = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Writes the data to the output, flushing headers if they have not yet been sent.
|
||||||
|
void write(const(void)[] t, bool isAll = false) {
|
||||||
|
assert(!closed, "Output has already been closed");
|
||||||
|
if(!outputtedResponseData && (!autoBuffer || isAll)) {
|
||||||
|
flushHeaders(t, isAll);
|
||||||
|
}
|
||||||
|
|
||||||
if(gzipResponse && acceptsGzip && isAll) { // FIXME: isAll really shouldn't be necessary
|
if(gzipResponse && acceptsGzip && isAll) { // FIXME: isAll really shouldn't be necessary
|
||||||
// actually gzip the data here
|
// actually gzip the data here
|
||||||
|
|
||||||
|
@ -749,7 +753,7 @@ class Cgi {
|
||||||
auto data = c.compress(t);
|
auto data = c.compress(t);
|
||||||
data ~= c.flush();
|
data ~= c.flush();
|
||||||
|
|
||||||
std.file.write("/tmp/last-item", data);
|
// std.file.write("/tmp/last-item", data);
|
||||||
|
|
||||||
t = data;
|
t = data;
|
||||||
}
|
}
|
||||||
|
|
4
dom.d
4
dom.d
|
@ -1231,7 +1231,7 @@ class Element {
|
||||||
Sets the inside text, replacing all children
|
Sets the inside text, replacing all children
|
||||||
*/
|
*/
|
||||||
@property void innerText(string text) {
|
@property void innerText(string text) {
|
||||||
assert(!selfClosed);
|
selfClosed = false;
|
||||||
Element e = new TextNode(parentDocument, text);
|
Element e = new TextNode(parentDocument, text);
|
||||||
e.parentNode = this;
|
e.parentNode = this;
|
||||||
children = [e];
|
children = [e];
|
||||||
|
@ -1761,7 +1761,7 @@ class Form : Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found) {
|
if(!found) {
|
||||||
addChild("option", value)
|
e.addChild("option", value)
|
||||||
.setAttribute("selected", "selected");
|
.setAttribute("selected", "selected");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue