GHC 2017-03-09

13 comments.

, https://git.io/vyV2b in Homebrew/homebrew-core
enchant 1.6.1
=============

Created with `brew bump-formula-pr`.

, https://git.io/vya5J in htacg/tidy-html5
Chiming in late: `|` (pipe) isn't a valid URI character per RFC 3986. Just read [the ABNF](https://tools.ietf.org/html/rfc3986#appendix-A) (I quote the ones related to the path segment):

```
   path          = path-abempty    ; begins with "/" or is empty
                 / path-absolute   ; begins with "/" but not "//"
                 / path-noscheme   ; begins with a non-colon segment
                 / path-rootless   ; begins with a segment
                 / path-empty      ; zero characters

   path-abempty  = *( "/" segment )
   path-absolute = "/" [ segment-nz *( "/" segment ) ]
   path-noscheme = segment-nz-nc *( "/" segment )
   path-rootless = segment-nz *( "/" segment )
   path-empty    = 0<pchar>

   segment       = *pchar
   segment-nz    = 1*pchar
   segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
                 ; non-zero-length segment without any colon ":"

   pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

   query         = *( pchar / "/" / "?" )

   fragment      = *( pchar / "/" / "?" )

   pct-encoded   = "%" HEXDIG HEXDIG

   unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
   reserved      = gen-delims / sub-delims
   gen-delims    = ":" / "/" / "?" / "#" / "[" / "]" / "@"
   sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
                 / "*" / "+" / "," / ";" / "="
```

RFC 3987 extends `unreserved` to `iunreserved`:

```

   iunreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~" / ucschar

   ucschar        = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
                  / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
                  / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
                  / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
                  / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
                  / %xD0000-DFFFD / %xE1000-EFFFD
```

but `|` is still invalid.

---

I also looked into the source code of the W3 validator: https://github.com/validator/validator. The URI validation is done by https://github.com/validator/galimatias. In particular, the validity of code points is checked by [`isURLCodePoint`](https://github.com/validator/galimatias/blob/68e380a3c78def134bffb97f01a6be74dc2db13f/src/main/java/io/mola/galimatias/URLUtils.java#L238), which I quote in full below:

```java
    public static boolean isURLCodePoint(final int c) {
        return
                isASCIIAlphanumeric(c) ||
                        c == '!' ||
                        c == '$' ||
                        c == '&' ||
                        c == '\'' ||
                        c == '(' ||
                        c == ')' ||
                        c == '*' ||
                        c == '+' ||
                        c == ',' ||
                        c == '-' ||
                        c == '.' ||
                        c == '/' ||
                        c == ':' ||
                        c == ';' ||
                        c == '=' ||
                        c == '?' ||
                        c == '@' ||
                        c == '_' ||
                        c == '~' ||
                        (c >= 0x00A0 && c <= 0xD7FF) ||
                        (c >= 0xE000 && c <= 0xFDCF) ||
                        (c >= 0xFDF0 && c <= 0xFFEF) ||
                        (c >= 0x10000 && c <= 0x1FFFD) ||
                        (c >= 0x20000 && c <= 0x2FFFD) ||
                        (c >= 0x30000 && c <= 0x3FFFD) ||
                        (c >= 0x40000 && c <= 0x4FFFD) ||
                        (c >= 0x50000 && c <= 0x5FFFD) ||
                        (c >= 0x60000 && c <= 0x6FFFD) ||
                        (c >= 0x70000 && c <= 0x7FFFD) ||
                        (c >= 0x80000 && c <= 0x8FFFD) ||
                        (c >= 0x90000 && c <= 0x9FFFD) ||
                        (c >= 0xA0000 && c <= 0xAFFFD) ||
                        (c >= 0xB0000 && c <= 0xBFFFD) ||
                        (c >= 0xC0000 && c <= 0xCFFFD) ||
                        (c >= 0xD0000 && c <= 0xDFFFD) ||
                        (c >= 0xE0000 && c <= 0xEFFFD) ||
                        (c >= 0xF0000 && c <= 0xFFFFD) ||
                        (c >= 0x100000 && c <= 0x10FFFD);
    }
```

, https://git.io/vyaQc in htacg/tidy-html5
Sorry for the late reply on a closed issue. But I don't think this is a duplicate of #352.

#352 is about truly invalid characters in hrefs, e.g. `|`, which isn't a valid URI character per either RFC 3986 or RFC 3987. The problem in the case is that tidy isn't spotting the invalid character, and isn't doing anything, not even emitting an error.

The issue here is different. `http://example.com/é` is a valid IRI per RFC 3987, and tidy is (arguably wrongly, by some evolving standards) flagging it as malformed.

, https://git.io/vy2Ah in soimort/you-get
> You mean the patch does not try to inform users which url has not been downloaded completely

Again, this is obvious from context.

, https://git.io/vygx4 in Homebrew/homebrew-core
```
$ curl -IL https://ftpmirror.gnu.org/coreutils/coreutils-8.26.tar.xz
HTTP/1.1 302 Moved Temporarily
Server: nginx/1.4.6 (Trisquel GNU/Linux)
Date: Thu, 09 Mar 2017 06:58:48 GMT
Connection: keep-alive
Location: http://open-source-box.org/coreutils/coreutils-8.26.tar.xz
X-Frame-Options: DENY
X-Content-Type-Options: nosniff

HTTP/1.1 200 OK
Date: Thu, 09 Mar 2017 05:10:50 GMT
Server: Apache/2.2.16 (Ubuntu)
Last-Modified: Wed, 30 Nov 2016 19:14:17 GMT
ETag: "7e0881-58a844-5428982dc9440"
Accept-Ranges: bytes
Content-Length: 5810244
Content-Type: application/x-tar
```

, https://git.io/vygNC in Homebrew/homebrew-core
coreutils 8.27
==============

Created with `brew bump-formula-pr`.

, https://git.io/vygNW in soimort/you-get
1. It's rather pointless to echo user input. Echoing back the URL is at best slightly more clear when users are downloading multiple videos, but even then due to the sequential nature of you-get, it's extremely easy to know exactly which URL the warning applies to.

    Note that currently error messages don't contain original URLs either. Not following conventions makes the (frankly already quite inconsistent, due to its nature) project inconsistent.

2. > Users should not be informed with segments.

    Users are already exposed to the total number of segments (that are not skipped) and the segment currently being downloaded in the progress bar. So this assertion has no ground.

    > Number of segments skipped does not help the user.

    As a user myself, it totally helps. When a video claimed to be 1GB (in fact, that number isn't available across the board, or it could be a wrong number) ended up with only 3 segments totally 100MB, knowing that 27 segments were skipped due to paywall instantly makes the situation clear, and helps estimate how much I'm missing out.

, https://git.io/vygFR in soimort/you-get
Not sure what you mean. This is just a warning, essentially telling the user "look, there are this many segments we can't do anything about". All intermediate URLs are useless without keys.

, https://git.io/vygSD in soimort/you-get
By the way, checking membership of `None` is perfectly fine. (1) An empty sequence or set type is vastly different from `None`; (2) `in` is a membership test operator; it doesn't test subset/subsequence. (Of course, I'm talking about its original use; `__contains__` can be implemented however you like, `str` being a good example.)

, https://git.io/vygyd in soimort/you-get
Thanks, fixed.

, https://git.io/vygXr in soimort/you-get
log: mark xterm* terminals as ANSI escape sequences-compatible
==============================================================

`xterm-color`, `xterm-16color`, `xterm-88color` and `xterm-256color` are now covered.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/soimort/you-get/1745)
<!-- Reviewable:end -->

, https://git.io/vygXU in soimort/you-get
youku: warn about segments skipped due to paywall
=================================================

This is especially helpful in cases where the entire video is blocked by paywall, resulting in an unhelpful error message

```
you-get: [Failed] Cannot extract video source.
```

I spent quite a few minutes debugging a URL like that,^ which could have been saved by the message

```
you-get: Skipping 27 out of 27 segments due to paywall
```

added by this commit.

^The video is completely region-blocked where I am, so I didn't know it was behind a paywall before feeding it to you-get — with a Mainland-based extractor proxy of course. That should explain my initial confusion — it would have been obvious if I checked its availability in a Unblock Youku-enabled browser session first. Still, more self-contained information should make you-get better.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/soimort/you-get/1744)
<!-- Reviewable:end -->

, https://git.io/vyg25 in Homebrew/brew
`osxfuse` may present a unique challenge, in that its pkgconfig file points to `/usr/local/lib`:

```
$ cat /usr/local/lib/pkgconfig/osxfuse.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: fuse
Description: OSXFUSE
Version: 2.7.3
Libs: -L${libdir} -losxfuse -pthread  -liconv
Cflags: -I${includedir}/osxfuse/fuse -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE
```