File: image-png

package info (click to toggle)
pgsql-http 1.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 276 kB
  • sloc: ansic: 1,211; sql: 483; makefile: 22; sh: 9
file content (32 lines) | stat: -rw-r--r-- 857 bytes parent folder | download | duplicates (2)
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
The /image/png endpoint returns a different length on Ubuntu

Still the same pig image, but smaller.

--- a/expected/http.out
+++ b/expected/http.out
@@ -182,12 +182,12 @@ WITH
   )
 SELECT
   http.content_type,
-  length(text_to_bytea(http.content)) AS length_binary
+  length(text_to_bytea(http.content)) in (5642, 8090) AS length_binary
 FROM http, headers
 WHERE field ilike 'Content-Type';
  content_type | length_binary 
 --------------+---------------
- image/png    |          8090
+ image/png    | t
 (1 row)
 
 -- Alter options and and reset them and throw errors
--- a/sql/http.sql
+++ b/sql/http.sql
@@ -122,7 +122,7 @@ WITH
   )
 SELECT
   http.content_type,
-  length(text_to_bytea(http.content)) AS length_binary
+  length(text_to_bytea(http.content)) in (5642, 8090) AS length_binary
 FROM http, headers
 WHERE field ilike 'Content-Type';