From 596e2d9a2367686862e2584f3ca1cc443cfa715d Mon Sep 17 00:00:00 2001 From: DevSnaith <65865554+DevSnaith@users.noreply.github.com> Date: Fri, 14 Apr 2023 02:36:02 +0300 Subject: [PATCH] Fix sorting problems --- .../eu/lumiere/net/http/HttpResponse.class | Bin 3645 -> 3656 bytes src/org/eu/lumiere/net/http/HttpResponse.java | 9 ++++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/org/eu/lumiere/net/http/HttpResponse.class b/bin/org/eu/lumiere/net/http/HttpResponse.class index 6e2a4920ab71c124d3fac3c8b899628c9eb4c8ae..6f8f1d30b8a3d5f3e32cfe2f4fdb1589650e2105 100644 GIT binary patch delta 536 zcmZWl%PxaK7(LVW@8vf|OIsCp5he7GQbGt8V&R^$v5-hK;u5P8w}hp8)I5Q>Tak)| zgjkB5C*To00ZxBnK_;1R=6vUzIp5qDJQe8AA9oJ`8gQA^&%MFk>G6eeV?Hr8YxGXd z&BP~?4}Nd^KlJ)-Uw8t4xv3S)o{(V-NDN{~z&?}8v+db**JM1=6JLtO6YAI*O1(NQ zq9O-2xRHTOc#wqva#0B%BJiV$w?X7#1VLrj4_r|=pfO@n9qPr_8`P*rJ+Zck6|BRG zdUnd-|mEz6PY2{K4Cy}KsZq8K&wh+#9SffuVU(Il_f{DTDphTob1->c#7~8P%qLDQ6=21 zqM5r-#oXbwHZzN#&Vc;QBF%RN(;Q)lJ;|;G$MCX7hzeF`HK)Ht|CQNGPi{ByPSa6- rbAB8JPS8grtv6WHdX4%L^)9nTm-1x#0;i_W8O~XCGM4%C7ahSbIx}3T delta 488 zcmYk2OG`pQ7>3_DdQy*b3bU(3Mi(tB1?@r?A_}@tQ6dr4>MX>ph^S*^n_6~Ls`&}s zFN?xx5frotqJBiHXwz?~J`X`LFyGAk&GYiT^IUdcro4RJJpgFJ<(_itcMi{J%UU3z z$L9hA+S2rhw$Q;~i^OB|nx0sUGPM1Bas9c=?2bPolakUbk71N!3}ND8QGF=mHK)zu z(duz3@Z*T%INQpZjV2>eJ@a9eSWN-UP+>Y5NZsdjy zA{lWL*u)kjqFvY~%|u)Qc8JVsKrPJQXn<@1v%qUXr+BbOY;`odkEX5{E httph; + private LinkedHashMap httph; private Socket client; public HttpResponse(Socket client, String status_line, String content_type) { this.content_type = content_type == null ? this.content_type : content_type; if(status_line != null && !status_line.isEmpty()) this.status_line = status_line; - httph = httph == null ? new HashMap<>() : httph; + httph = httph == null ? new LinkedHashMap<>() : httph; this.client = client; } public void push(String body) { try { StringBuilder build = new StringBuilder(status_line+"\r\n"); - for(String key : getKeySet()) { + for(String key : httph.keySet()) { build.append(String.format("%s: %s\r\n", key, getProperty(key))); } client.getOutputStream().write(build.append("\r\n").append(body).toString().getBytes());