Skip to Content.
Sympa Menu

rare-dev - Re: [rare-dev] Automated profile optimizer

Subject: Rare project developers

List archive

Re: [rare-dev] Automated profile optimizer


Chronological Thread 
  • From: Alexander Gall <>
  • To: mc36 <>
  • Cc: <>, Frédéric LOUI <>
  • Subject: Re: [rare-dev] Automated profile optimizer
  • Date: Wed, 8 Feb 2023 11:39:53 +0100

On Tue, 7 Feb 2023 14:00:24 +0100, Alexander Gall <> said:

> On Tue, 7 Feb 2023 11:09:08 +0100, Alexander Gall <> said:
>> On Tue, 7 Feb 2023 11:04:16 +0100, mc36 <> said:
>>> hi,
>>> On 2/7/23 11:00, mc36 wrote:
>>>>> Just remove and re-add the tag. I have enabled some debugging to see
>>>>> why it fails when you do this.
>>>>>
>>>> i'll do it right now...
>>>>

>> So it failed again. It's very strange. The script reads the message
>> body (which is a piece of JSON) like this

>> read -n "$CONTENT_LENGTH" body

>> I can see in the CGI log that the script is stuck right there

>> Feb 07 11:02:46 hydra-nix fcgiwrap[1327450]: + read -n 1266 body

>> That suggests that somehow there are not enough bytes in the input and
>> the read blocks. It doesn't happen when I add the tag, so I'm a bit
>> confused right now :/

> I still don't understand it. Maybe "read" somehow chokes on the
> non-ASCII characters in your name (part of the JSON blob that the
> webhook receives from Bitbucket).

Indeed. read terminates with an error in that case :/ The solution was
to replace it with

body=$(head -c "$CONTENT_LENGTH")

Hopefully, this mechanism will work for you next time :)

--
Alex



Archive powered by MHonArc 2.6.19.

Top of Page