Raw file URLs and repository transfers

I’ve stumbled upon an interesting behavior. Transferring repositories results in 301 redirects for web pages but in 200 for raw file URLs.

For example, gojuno/mainframer was moved to buildfoundation/mainframer months ago.

curl "https://github.com/gojuno/mainframer/blob/3.x/README.md" --verbose
< HTTP/1.1 301 Moved Permanently

curl "https://raw.githubusercontent.com/gojuno/mainframer/3.x/README.md" --verbose
< HTTP/1.1 200 OK

The thing is — the raw file content actually is not one from the original (before transfer) repository, but it is from the transferred one, i.e. with changes.

Questions are:

  • Is it a bug or a feature?
  • Will it remain the same in the future?
  • Is there any way to get 301 instead of 200 in such situations?