mirror of https://github.com/zlatinb/muwire
extra newline after POST
parent
42ddd321ea
commit
f0c3a0de9e
|
@ -182,9 +182,9 @@ class ConnectionAcceptor {
|
||||||
if (!searchManager.hasLocalSearch(resultsUUID))
|
if (!searchManager.hasLocalSearch(resultsUUID))
|
||||||
throw new UnexpectedResultsException(resultsUUID.toString())
|
throw new UnexpectedResultsException(resultsUUID.toString())
|
||||||
|
|
||||||
byte[] rn = new byte[2]
|
byte[] rn = new byte[4]
|
||||||
dis.readFully(rn)
|
dis.readFully(rn)
|
||||||
if (rn != "\r\n".getBytes(StandardCharsets.US_ASCII))
|
if (rn != "\r\n\r\n".getBytes(StandardCharsets.US_ASCII))
|
||||||
throw new IOException("invalid request header")
|
throw new IOException("invalid request header")
|
||||||
|
|
||||||
Persona sender = new Persona(dis)
|
Persona sender = new Persona(dis)
|
||||||
|
|
|
@ -77,7 +77,7 @@ class ResultsSender {
|
||||||
try {
|
try {
|
||||||
endpoint = connector.connect(target)
|
endpoint = connector.connect(target)
|
||||||
DataOutputStream os = new DataOutputStream(endpoint.getOutputStream())
|
DataOutputStream os = new DataOutputStream(endpoint.getOutputStream())
|
||||||
os.write("POST $uuid\r\n".getBytes(StandardCharsets.US_ASCII))
|
os.write("POST $uuid\r\n\r\n".getBytes(StandardCharsets.US_ASCII))
|
||||||
me.write(os)
|
me.write(os)
|
||||||
os.writeShort((short)results.length)
|
os.writeShort((short)results.length)
|
||||||
results.each {
|
results.each {
|
||||||
|
|
Loading…
Reference in New Issue