sebastian-nagel commented on PR #1997:
URL: https://github.com/apache/stormcrawler/pull/1997#issuecomment-4970646697
Thanks, for the careful review, @dpol1! I'll update the PR to address your
comments.
> Guava turns ::ffff:192.0.2.128 into IPv4. Is that intentional?
Well, it's rather enforced by the behavior of Java's InetAddress class:
```
jshell> InetAddress.getByName("::ffff:127.0.0.1").getClass()
$1 ==> class java.net.Inet4Address
jshell>
InetAddress.getByName("127.0.0.1").equals(InetAddress.getByName("::ffff:127.0.0.1"))
$2 ==> true
```
But very good point. Looks like, there is no recommendation how IPv4-mapped
addresses are recorded. Needs clarification. For now we can keep the unit
tests, I think.
The unit test replicates the behavior of
[jwarc](https://github.com/iipc/jwarc/) which archives IPv6-mapped IPv4
addresses as IPv4:
```
WARC-IP-Address: 127.0.0.1
WARC-Target-URI: http://[0:0:0:0:0:ffff:127.0.0.1]/
```
Other WARC-archiving tools behave different, e.g.,
[warcprox](https://github.com/internetarchive/warcprox/):
```
WARC-Target-URI: http://[0:0:0:0:0:ffff:127.0.0.1]/
WARC-IP-Address: ::ffff:127.0.0.1
```
But it's maybe an open question whether this is the desired behavior, cf.
internetarchive/warcprox#277.
--
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]