mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-13 22:54:49 -04:00
Backend complete. v0.3 ready for QA.
This commit is contained in:
parent
65f084591a
commit
53a8a2337f
9 changed files with 132 additions and 74 deletions
|
@ -31,21 +31,21 @@ public class NETPacket {
|
|||
"Date: %s\r\n" +
|
||||
"Connection: close\r\n"+
|
||||
"Content-Type: text/html;charset=utf-8\r\n"+
|
||||
"Content-Length: 0\r\b\r\n";
|
||||
"Content-Length: 0\r\n\r\n";
|
||||
private static final String CODE_404 =
|
||||
"HTTP/1.0 404 Not Found\r\n"+
|
||||
"Server: NS-USBloader-"+NSLMain.appVersion+"\r\n" +
|
||||
"Date: %s\r\n" +
|
||||
"Connection: close\r\n"+
|
||||
"Content-Type: text/html;charset=utf-8\r\n"+
|
||||
"Content-Length: 0\r\b\r\n";
|
||||
"Content-Length: 0\r\n\r\n";
|
||||
private static final String CODE_416 =
|
||||
"HTTP/1.0 416 Requested Range Not Satisfiable\r\n"+
|
||||
"Server: NS-USBloader-"+NSLMain.appVersion+"\r\n" +
|
||||
"Date: %s\r\n" +
|
||||
"Connection: close\r\n"+
|
||||
"Content-Type: text/html;charset=utf-8\r\n"+
|
||||
"Content-Length: 0\r\b\r\n";
|
||||
"Content-Length: 0\r\n\r\n";
|
||||
public static String getCode200(long nspFileSize){
|
||||
return String.format(CODE_200, ZonedDateTime.now(ZoneId.of("GMT")).format(DateTimeFormatter.RFC_1123_DATE_TIME), nspFileSize-1, nspFileSize, nspFileSize);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue