Skip to content

Commit 8ac294d

Browse files
committed
remove spdy
1 parent ee74d14 commit 8ac294d

21 files changed

+26
-4500
lines changed

AndroidAsync/src/com/koushikdutta/async/http/AsyncHttpClient.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import com.koushikdutta.async.future.SimpleFuture;
1919
import com.koushikdutta.async.http.callback.HttpConnectCallback;
2020
import com.koushikdutta.async.http.callback.RequestCallback;
21-
import com.koushikdutta.async.http.spdy.SpdyMiddleware;
2221
import com.koushikdutta.async.parser.AsyncParser;
2322
import com.koushikdutta.async.parser.ByteBufferListParser;
2423
import com.koushikdutta.async.parser.JSONArrayParser;
@@ -64,14 +63,14 @@ public void insertMiddleware(AsyncHttpClientMiddleware middleware) {
6463
mMiddleware.add(0, middleware);
6564
}
6665

67-
SpdyMiddleware sslSocketMiddleware;
66+
AsyncSSLSocketMiddleware sslSocketMiddleware;
6867
AsyncSocketMiddleware socketMiddleware;
6968
HttpTransportMiddleware httpTransportMiddleware;
7069
AsyncServer mServer;
7170
public AsyncHttpClient(AsyncServer server) {
7271
mServer = server;
7372
insertMiddleware(socketMiddleware = new AsyncSocketMiddleware(this));
74-
insertMiddleware(sslSocketMiddleware = new SpdyMiddleware(this));
73+
insertMiddleware(sslSocketMiddleware = new AsyncSSLSocketMiddleware(this));
7574
insertMiddleware(httpTransportMiddleware = new HttpTransportMiddleware());
7675
sslSocketMiddleware.addEngineConfigurator(new SSLEngineSNIConfigurator());
7776
}
@@ -116,7 +115,7 @@ public AsyncSocketMiddleware getSocketMiddleware() {
116115
return socketMiddleware;
117116
}
118117

119-
public SpdyMiddleware getSSLSocketMiddleware() {
118+
public AsyncSSLSocketMiddleware getSSLSocketMiddleware() {
120119
return sslSocketMiddleware;
121120
}
122121

AndroidAsync/src/com/koushikdutta/async/http/server/BoundaryEmitter.java

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,29 @@ protected void onBoundaryEnd() {
4343
// the state starts out having already matched \r\n
4444

4545
/*
46-
Content-Type: multipart/form-data; boundary=----------------------------bc3c801ac760
47-
48-
------------------------------bc3c801ac760
49-
Content-Disposition: form-data; name="my-file"; filename="foo"
50-
Content-Type: application/octet-stream
51-
52-
foo <---------------- the newline is NOT PART OF THE PAYLOAD
53-
------------------------------bc3c801ac760--
54-
*/
46+
Mac:work$ curl -F person=anonymous -F [email protected] http://localhost:5555
47+
48+
POST / HTTP/1.1
49+
Host: localhost:5555
50+
User-Agent: curl/7.54.0
51+
Content-Length: 372
52+
Expect: 100-continue
53+
Content-Type: multipart/form-data; boundary=------------------------17903558439eb6ff
54+
55+
--------------------------17903558439eb6ff <--- note! two dashes before boundary
56+
Content-Disposition: form-data; name="person"
57+
58+
anonymous
59+
--------------------------17903558439eb6ff <--- note! two dashes before boundary
60+
Content-Disposition: form-data; name="secret"; filename="test.kt"
61+
Content-Type: application/octet-stream
62+
63+
fun main(args: Array<String>) {
64+
println("Hello JavaScript!")
65+
}
66+
67+
--------------------------17903558439eb6ff-- <--- note! two dashes before AND after boundary
68+
*/
5569

5670

5771
int state = 2;

0 commit comments

Comments
 (0)