node.js - Strange trailing character received from res.end -


here's backend code:

res.statuscode = 400 res.setheader 'content-type', 'text/plain' res.end 'invalid api endpoint.' 

when curl terminal, get:

invalid api endpoint.% 

the "%" sign shows inverted colors.

why "%" sign there?

this marks partial line, since response send not have trailing newline.

man zshoptions 
    prompt_sp <d>           attempt   preserve  partial line (i.e. line did not           end newline) otherwise covered             command prompt due prompt_cr option.  works out‐           putting cursor-control characters, including  series  of           spaces,   should  make  terminal wrap next line           when partial line present (note success‐           ful if terminal has automatic margins, typical). 
          when   partial  line preserved, default see           inverse+bold character @ end of partial line:    "%"           normal user or "#" root.  if set, shell parame‐           ter prompt_eol_mark can used customize  how   end  of           partial lines shown.            note:  if prompt_cr option not set, enabling option           have no effect.  option on default. 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -