Decode str in attachreader in a common way
Adjust some logic
Move HttpErrorHandler to middleware