fix stupid warnings

This commit is contained in:
Adam D. Ruppe 2018-11-22 08:50:46 -05:00
parent 18673f0b1b
commit fdb5782736
2 changed files with 13 additions and 3 deletions

12
cgi.d
View File

@ -1,6 +1,18 @@
// FIXME: if an exception is thrown, we shouldn't necessarily cache...
// FIXME: there's some annoying duplication of code in the various versioned mains
/*
void foo(int f, @("test") string s) {}
void main() {
static if(is(typeof(foo) Params == __parameters))
//pragma(msg, __traits(getAttributes, Params[0]));
pragma(msg, __traits(getAttributes, Params[1..2]));
else
pragma(msg, "fail");
}
*/
// Note: spawn-fcgi can help with fastcgi on nginx
// FIXME: to do: add openssl optionally

View File

@ -866,7 +866,6 @@ class HttpRequest {
}
data = data[a + 1 .. $];
goto start_over;
break;
case 2: // reading data
auto can = a + bodyReadingState.contentLengthRemaining;
if(can > data.length)
@ -894,7 +893,6 @@ class HttpRequest {
bodyReadingState.chunkedState++;
data = data[a + 1 .. $];
goto start_over;
break;
case 4: // reading 10 at end of packet
assert(data[a] == 10);
data = data[a + 1 .. $];
@ -1368,7 +1366,7 @@ version(use_openssl) {
ssl = SSL_new(ctx);
if(!verifyPeer)
SSL_set_verify(ssl, SSL_VERIFY_NONE, null);
SSL_set_fd(ssl, this.handle);
SSL_set_fd(ssl, cast(int) this.handle); // on win64 it is necessary to truncate, but the value is never large anyway see http://openssl.6102.n7.nabble.com/Sockets-windows-64-bit-td36169.html
}
bool dataPending() {