Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.10:testing
obs-server
obs-server-2.10-0024-backend-Make-chekconstrain...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.10-0024-backend-Make-chekconstraints-in-repserver-not-fail-o.patch of Package obs-server
From 2d30b8ca0818f2bfdcf4347df1c89ff14569ca6b Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Mon, 15 Oct 2018 00:28:21 +0100 Subject: [PATCH] [backend] Make chekconstraints in repserver not fail on empty payload. Sometimes frontend sends "/worker?cmd=checkconstraints" POST request to srcserver with the following headers: Content-Type: application/octet-stream Content-Length: 0 This causes srcserver to pass empty payload to repserver using chunked encoding, making it think that it has content in request and failing to parse empty data received it as XML. This change fixes this bug. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- src/backend/bs_repserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/bs_repserver b/src/backend/bs_repserver index b6f5139613..73698a23ee 100755 --- a/src/backend/bs_repserver +++ b/src/backend/bs_repserver @@ -4063,7 +4063,7 @@ sub checkconstraints { mkdir_p($uploaddir); my $uploaded = BSServer::read_file("$uploaddir/$$"); die("upload failed\n") unless $uploaded; - $constraints = readxml("$uploaddir/$$", $BSXML::constraints); + $constraints = readxml("$uploaddir/$$", $BSXML::constraints) if $uploaded->{'size'} > 0; unlink("$uploaddir/$$"); } my $info; -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor