[Progress Communities] [Progress OpenEdge ABL] Forum Post: OpenEdge.NET.HttpHeaderBuilder returns a 504 Gateway Time out on OE 11.6.3 but works fine o

Status
Not open for further replies.
O

onnodehaan

Guest
Hi guys I've written a piece of code to upload a file to a REST-service using the new HttpHeaderBuilder classes. This works fine on 11.7.3. The file is uploaded correctly; we use this in production with multiple customers. However, when I run the exact same code on a slightly older OpenEdge version, 11.6.3.022, it returns a 504 Gateway Timeout error after 1 minute. I can't find any clues on the Knowledge Base, so I'm hoping someone has some pointers for me because I'm a bit los for now :) See this snippet below to see the simplified structure of the code, assign oMultiEntity = new MultipartEntity() oMultiEntity:Boundary = guid oAttachment = new OpenEdge.Core.Memptr(ipFileContent) oPart = new OpenEdge.Net.MessagePart('application/octet-stream':U, oAttachment) oPart:ContentId = 'filedata':U cUrl = 'https://':U + cHost + '/api/attachments?id=':U + cId. oPart:Headers:put(HttpHeaderBuilder:Build('Content-Disposition':U) :Value('form-data; name="filedata"; filename="':U + ipFileName + '"':U) :Header). oMultiEntity:AddPart(oPart). oRequest = RequestBuilder:post(cUrl, oMultiEntity) :AddHeader('Content-Type':U, 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW2':U) :Request. oResponse = ClientBuilder:Build():Client:Execute(oRequest). // After 1 minute i get back a 504 - Gateway Timeout on OpenEdge 11.6.3.022, but on OpenEdge 11.7.3 everything works fine

Continue reading...
 
Status
Not open for further replies.
Top