AI Briefing
KO

The URL Looks Wrong! Who's the Culprit, Java or Spring?

·2024.09.26 19:00

Key point

This analyzes a URL processing failure in Kakao Pay's Notification Feed service caused by a behavioral mismatch between Java's URI class and Spring's UriComponentsBuilder.

1 / 2

Details

While processing message landing URLs in Kakao Pay's Notification Feed service, an incident occurred where the host information of a specific URL disappeared. This began when logic was added to remove a specific parameter from the URL in order to make the landing behavior of the OS notification center and the notification feed different.

The cause of the incident was a behavioral mismatch between the java.net.URI class and Spring's UriComponentsBuilder class. When using the UriComponentsBuilder.fromUri(URI(this)) approach, it was found that during the conversion of a specific URL format (e.g., kakaopay://payweb_tab) into a java.net.URI object, the host information was processed as null.

As a result, UriComponentsBuilder received incorrect information from the URI object and generated a response missing key elements of the URL. To resolve this, the logic was improved to use the fromUriString method, which handles the string directly without going through a URI object in between.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.