Comments (2)
The problem is that I'm just taking the last Location: header in the chain, and hoping it's good enough. I guess the proper way to do things is to dig down into LWP::UA and use $ua->simple_request
and manually follow the redirect chain.
I'm not sure if it's necessarily a bug that an intermediate step in that chain doesn't match the whitelist, unless you can think of a reason why it should? For example, with your t.co link, we have:
http://t.co/AgHfYlq -> http://www.faz.net/-025ATJ
http://www.faz.net/-025ATJ -> http://www.faz.net//artikel/C31315/ueberwachung-wir-leben-noch-frei-aber-nicht-mehr-lange-30685243.html
Should the output here be the -025SATJ
url, or the terminal redirection?
Part of resolving this should solve the 2nd part, of making sure URLs get canonicalised as well.
from irssi-scripts.
Personally I'd prefer the output of longify-urls to be
http://www.faz.net/-025ATJ.
But the real issue is the missing hostnames (2nd part). If you feel you
can solve the canonicalization more easily without stepping through the
redirect chain I'd be way happier than today, too!
from irssi-scripts.
Related Issues (20)
- uberprompt load resets prompt statusbar to defaults
- takes forever to unload HOT 1
- historical in-channel regex substitution HOT 1
- longify: check if returning 200 OK crashes.
- better cron.pl
- better hilight
- ignore with recency list
- nethack theme
- Log Management
- make /j #foo change window to ##foo if you are already on ##foo on freenode HOT 2
- Check UTF-8 variables / input data are displayed correctly HOT 2
- How do I insert colors when <C-c> is mapped to <ESC>? HOT 1
- ido mode deletes lines from scrollback HOT 1
- [SOLVED] vim-mode "jk" command mode sequence HOT 3
- Buffer switching with letters HOT 3
- auto-server breaks on servers without MOTD
- vim_mode statusbar items in prompt statusbar gone after restart HOT 1
- vim_mode: rewrite input handling system to be more flexible/readable
- extract split-window creation/output/destruction into separate script HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irssi-scripts.