What format should I use for the last-modified property in list API response when using scheme = azblob? #4998
-
Hi, thanks for providing a convenient way to access data! Have a question about specific API. I have working implementation for read/write from Azure Blob Storage using java_binding. I tried to create a lightweight test by using stub http server. Read/write work fine, but when I try to use After checking code, I think I'm hitting last modified date extraction I tried to add Experiments so far:
It's probably similar to #3478. What format should I use for Last-Modified property? Is there any specific requirement for the date other than being rfc2822 complaint? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, we are using The error I'm not an expert in Java, so I just skimmed the code at AzureHttpHandler.java to give you some inspiration. For example, the content length of the response could be incorrect if we have multi-byte characters like Chinese in the response: byte[] response = list.toString().getBytes(StandardCharsets.UTF_8);
exchange.getResponseHeaders().add("Content-Type", "application/xml");
exchange.sendResponseHeaders(RestStatus.OK.getStatus(), response.length);
exchange.getResponseBody().write(response); |
Beta Was this translation helpful? Give feedback.
-
In case its useful for someone else: in addition to |
Beta Was this translation helpful? Give feedback.
Hi, we are using
chrono
to parseDateTime
by DateTime::parse_from_rfc2822. I believeMon, 12 Aug 2024 11:16:46 UT
should be a valid date time for us.The error
Connection reset by peer (os error 54)
suggests there might be other network-related issues, such as the server closing the connection too early.I'm not an expert in Java, so I just skimmed the code at AzureHttpHandler.java to give you some inspiration.
For example, the content length of the response could be incorrect if we have multi-byte characters like Chinese in the response:
https://github.com/crate/crate/blob/9ecf9b81515cb336683f62fc22b44d6876456e03/plugins/es-repository-azure/src/test/java/org/elasticsearch/repositories/a…