Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit 4002792

Browse files
committed
Change casing
1 parent 1611708 commit 4002792

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

src/ktt/lib/httpserver/SimpleHttpExchange.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package ktt.lib.httpserver;
22

33
import com.sun.net.httpserver.*;
4+
import ktt.lib.httpserver.var.HttpCode;
45
import ktt.lib.httpserver.var.RequestMethod;
56

67
import java.io.IOException;
@@ -376,7 +377,7 @@ static SimpleHttpExchange create(final HttpExchange exchange){
376377
*
377378
* @return response code
378379
*
379-
* @see ktt.lib.httpserver.var.HTTPCode
380+
* @see HttpCode
380381
* @see #sendResponseHeaders(int, long)
381382
* @since 02.00.00
382383
* @author Ktt Development
@@ -400,12 +401,12 @@ static SimpleHttpExchange create(final HttpExchange exchange){
400401
*
401402
* @param cookie cookie to set
402403
*
403-
* @see SimpleHTTPCookie
404+
* @see SimpleHttpCookie
404405
* @see #getResponseHeaders()
405406
* @since 02.00.00
406407
* @author Ktt Development
407408
*/
408-
public abstract void setCookie(final SimpleHTTPCookie cookie);
409+
public abstract void setCookie(final SimpleHttpCookie cookie);
409410

410411
//
411412

@@ -430,7 +431,7 @@ static SimpleHttpExchange create(final HttpExchange exchange){
430431
* @throws IOException internal server error
431432
*
432433
* @see #getResponseHeaders()
433-
* @see ktt.lib.httpserver.var.HTTPCode
434+
* @see HttpCode
434435
* @since 02.00.00
435436
* @author Ktt Development
436437
*/

src/ktt/lib/httpserver/SimpleHttpExchangeImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public final HashMap<String, String> getCookies(){
339339
}
340340

341341
@Override
342-
public synchronized final void setCookie(final SimpleHTTPCookie cookie){
342+
public synchronized final void setCookie(final SimpleHttpCookie cookie){
343343
getResponseHeaders().add("Set-Cookie",cookie.toString());
344344
}
345345

@@ -351,7 +351,7 @@ public synchronized final HttpSession getHttpSession(){
351351
final HttpSession session;
352352
if((sessionId = cookies.get("__session-id")) == null || !HttpSession.sessions.containsKey(sessionId)){
353353
session = HttpSession.create();
354-
setCookie(new SimpleHTTPCookie("__session-id",session.getSessionID(),null,null,null,null,null,false,true));
354+
setCookie(new SimpleHttpCookie("__session-id", session.getSessionID(), null, null, null, null, null, false, true));
355355
}else{
356356
session = HttpSession.sessions.get(sessionId);
357357
}
@@ -372,12 +372,12 @@ public synchronized final void send(final int responseCode) throws IOException{
372372

373373
@Override
374374
public synchronized final void send(final byte[] response) throws IOException{
375-
send(response, HTTPCode.HTTP_OK,false);
375+
send(response, HttpCode.HTTP_OK, false);
376376
}
377377

378378
@Override
379379
public void send(final byte[] response, final boolean gzip) throws IOException{
380-
send(response,HTTPCode.HTTP_OK,gzip);
380+
send(response, HttpCode.HTTP_OK, gzip);
381381
}
382382

383383
@Override
@@ -405,12 +405,12 @@ public void send(final byte[] response, final int responseCode, final boolean gz
405405

406406
@Override
407407
public synchronized final void send(final String response) throws IOException{
408-
send(response.getBytes(StandardCharsets.UTF_8),HTTPCode.HTTP_OK,false);
408+
send(response.getBytes(StandardCharsets.UTF_8), HttpCode.HTTP_OK, false);
409409
}
410410

411411
@Override
412412
public void send(final String response, final boolean gzip) throws IOException{
413-
send(response.getBytes(StandardCharsets.UTF_8),HTTPCode.HTTP_OK,gzip);
413+
send(response.getBytes(StandardCharsets.UTF_8), HttpCode.HTTP_OK, gzip);
414414
}
415415

416416
@Override

src/ktt/lib/httpserver/handler/FileHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package ktt.lib.httpserver.handler;
22

3-
import ktt.lib.httpserver.var.HTTPCode;
3+
import ktt.lib.httpserver.var.HttpCode;
44
import ktt.lib.httpserver.SimpleHttpExchange;
55
import ktt.lib.httpserver.SimpleHttpHandler;
66

@@ -677,7 +677,7 @@ public final void handle(final SimpleHttpExchange exchange) throws IOException{
677677
* @author Ktt Development
678678
*/
679679
public void handle(final SimpleHttpExchange exchange, final File source, final byte[] bytes) throws IOException {
680-
exchange.send(bytes, HTTPCode.HTTP_OK);
680+
exchange.send(bytes, HttpCode.HTTP_OK);
681681
}
682682

683683
//

src/ktt/lib/httpserver/handler/RedirectHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package ktt.lib.httpserver.handler;
22

3-
import ktt.lib.httpserver.var.HTTPCode;
3+
import ktt.lib.httpserver.var.HttpCode;
44
import ktt.lib.httpserver.SimpleHttpExchange;
55
import ktt.lib.httpserver.SimpleHttpHandler;
66

@@ -34,7 +34,7 @@ public RedirectHandler(final String link){
3434
@Override
3535
public final void handle(final SimpleHttpExchange exchange) throws IOException{
3636
exchange.getResponseHeaders().set("Location",link);
37-
exchange.send(HTTPCode.HTTP_Found);
37+
exchange.send(HttpCode.HTTP_Found);
3838
}
3939

4040
//

0 commit comments

Comments
 (0)