500 Error on /api/input
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
The payload names only the POST endpoint /api/input and the Apache/PHP server headers; it does not name the source files that handle it. Start by reproducing a POST with a JSON body and reading the server error log to find the failing code path. Done means the endpoint accepts a well-formed GeoJSON body with a 200 response and parses it, with the content-type behaviour explained.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm trying to use Compass + Overland and am encountering 500 Internal Service Error's when attempting to POST to /api/input while running in MAMP. I see this same issue when I test locally with Postman. It seems the server is rejecting the request due to invalid content types - "Request failed: unacceptable content-type: text/html".
Is there a way to set acceptable content types for the server or is there something else causing this issue?
When testing with Postman, if I send the body GeoJSON data as text/html the server returns a 200 but just can't parse it, if I send as application/json it fails with a 500 even though it's seemingly correctly-formed.
Here's the full printed error Overland's side:
Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: internal server error (500)" UserInfo={NSLocalizedDescription=Request failed: internal server error (500), NSUnderlyingError=0x600000f879c0 {Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html" UserInfo={NSLocalizedDescription=Request failed: unacceptable content-type: text/html, NSErrorFailingURLKey=http://192.168.1.XX/api/input?token=VieLE9Mu3TWRITE, com.alamofire.serialization.response.error.data={length = 4519, bytes = 0x3c21444f 43545950 45206874 6d6c3e0a ... 0a3c2f68 746d6c3e }, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x6000001eed20> { URL: http://192.168.1.XX/api/input?token=VieLE9Mu3TWRITE } { Status Code: 500, Headers {
"Cache-Control" = (
"no-cache, private"
);
Connection = (
close
);
"Content-Length" = (
4519
);
"Content-Type" = (
"text/html; charset=UTF-8"
);
Date = (
"Wed, 04 Sep 2019 05:28:45 GMT"
);
Server = (
"Apache/2.2.34 (Unix) mod_wsgi/3.5 Python/2.7.13 PHP/7.3.7 mod_ssl/2.2.34 OpenSSL/1.0.2o DAV/2 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.10 Perl/v5.24.0"
);
"X-Powered-By" = (
"PHP/7.3.7"
);
} }}}, NSErrorFailingURLKey=http://192.168.1.XX/api/input?token=VieLE9Mu3TWRITE, com.alamofire.serialization.response.error.data={length = 4519, bytes = 0x3c21444f 43545950 45206874 6d6c3e0a ... 0a3c2f68 746d6c3e }, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x6000001eed20> { URL: http://192.168.1.XX/api/input?token=VieLE9Mu3TWRITE } { Status Code: 500, Headers {
"Cache-Control" = (
"no-cache, private"
);
Connection = (
close
);
"Content-Length" = (
4519
);
"Content-Type" = (
"text/html; charset=UTF-8"
);
Date = (
"Wed, 04 Sep 2019 05:28:45 GMT"
);
Server = (
"Apache/2.2.34 (Unix) mod_wsgi/3.5 Python/2.7.13 PHP/7.3.7 mod_ssl/2.2.34 OpenSSL/1.0.2o DAV/2 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.10 Perl/v5.24.0"
);
"X-Powered-By" = (
"PHP/7.3.7"
);
} }}
- Ngôn ngữ chính
- JavaScript
- Star
- 143
- Fork
- 33
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aaronpk/Compass
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
-
docker supportĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
-
Compass Does Not Support PKCEĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Tất cả issue của aaronpk/Compass
Issue tương tự
-
chore cloudflare-workers consistency d1 difficulty: easy documentation dx enhancement good first issue help wanted hygiene javascript maintenance priority: P3 seo
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Link Checker ReportĐang mởautomated issue report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
MattiaPARRINELLO/backstage#70 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
untemps/svelte-palette#298 ·