davidradl commented on code in PR #34:
URL: 
https://github.com/apache/flink-connector-http/pull/34#discussion_r3187896556


##########
flink-connector-http/src/main/java/org/apache/flink/connector/http/sink/httpclient/JavaNetSinkHttpClient.java:
##########
@@ -73,6 +74,23 @@ public JavaNetSinkHttpClient(
                         properties,
                         headerPreprocessor);
 
+        // Apply the User-Agent header. If the user also set it via
+        // 'http.sink.header.User-Agent', fail fast so that we do not silently 
drop
+        // one of the two values.
+        String userAgent =
+                properties.getProperty(
+                        HttpDynamicSinkConnectorOptions.USER_AGENT.key(),
+                        
HttpDynamicSinkConnectorOptions.USER_AGENT.defaultValue());
+        if (userAgent != null && !userAgent.isEmpty()) {

Review Comment:
   userAgent will always have a value here - as it will be the user specified 
one or the default. So there is no way to specify http.sink.header.User-Agent 
and have it work after this change
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to