File: Drop-non-DFSG-free-server-frontend.patch

package info (click to toggle)
llama.cpp 6641%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,640 kB
  • sloc: cpp: 218,020; ansic: 117,624; python: 29,020; lisp: 9,094; sh: 5,776; objc: 1,045; javascript: 828; xml: 259; makefile: 219
file content (59 lines) | stat: -rw-r--r-- 2,282 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From: Christian Kastner <ckk@kvr.at>
Date: Mon, 19 May 2025 13:05:49 +0200
Subject: Drop non-DFSG-free server frontend

We cannot embed the default, React-based server frontend because we
cannot rebuild it from source, as not all relevant dependencies are
available in Debian.

Forwarded: not-needed
---
 tools/server/CMakeLists.txt |  1 -
 tools/server/server.cpp     | 15 ---------------
 2 files changed, 16 deletions(-)

Index: llama.cpp/tools/server/CMakeLists.txt
===================================================================
--- llama.cpp.orig/tools/server/CMakeLists.txt
+++ llama.cpp/tools/server/CMakeLists.txt
@@ -12,7 +12,6 @@ set(TARGET_SRCS
     utils.hpp
 )
 set(PUBLIC_ASSETS
-    index.html.gz
     loading.html
 )
 
Index: llama.cpp/tools/server/server.cpp
===================================================================
--- llama.cpp.orig/tools/server/server.cpp
+++ llama.cpp/tools/server/server.cpp
@@ -15,7 +15,6 @@
 #define MIMETYPE_JSON "application/json; charset=utf-8"
 
 // auto generated files (see README.md for details)
-#include "index.html.gz.hpp"
 #include "loading.html.hpp"
 
 #include <atomic>
@@ -5212,20 +5211,6 @@ int main(int argc, char ** argv) {
                 LOG_ERR("%s: static assets path not found: %s\n", __func__, params.public_path.c_str());
                 return 1;
             }
-        } else {
-            // using embedded static index.html
-            svr->Get(params.api_prefix + "/", [](const httplib::Request & req, httplib::Response & res) {
-                if (req.get_header_value("Accept-Encoding").find("gzip") == std::string::npos) {
-                    res.set_content("Error: gzip is not supported by this browser", "text/plain");
-                } else {
-                    res.set_header("Content-Encoding", "gzip");
-                    // COEP and COOP headers, required by pyodide (python interpreter)
-                    res.set_header("Cross-Origin-Embedder-Policy", "require-corp");
-                    res.set_header("Cross-Origin-Opener-Policy", "same-origin");
-                    res.set_content(reinterpret_cast<const char*>(index_html_gz), index_html_gz_len, "text/html; charset=utf-8");
-                }
-                return false;
-            });
         }
     }