Skip to content

Commit

Permalink
Added support for the 'translate' header (alias of the 'source' header)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed Jun 10, 2017
1 parent 5bee991 commit 2d9627e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/server/MethodCallArgs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export declare class MethodCallArgs {
exit: () => void;
callback: () => void;
contentLength: number;
isSource: boolean;
depth: number;
host: string;
path: FSPath;
Expand Down
2 changes: 2 additions & 0 deletions src/server/MethodCallArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import * as url from 'url'
export class MethodCallArgs
{
contentLength : number
isSource : boolean
depth : number
host : string
path : FSPath
Expand All @@ -29,6 +30,7 @@ export class MethodCallArgs
public callback : () => void
) {
this.contentLength = parseInt(this.findHeader('Content-length', '0'), 10);
this.isSource = this.findHeader('source', 'F').toUpperCase() === 'T' || this.findHeader('translate', 'F').toUpperCase() === 'T';
this.depth = parseInt(this.findHeader('Depth', '0'), 10);
this.host = this.findHeader('Host');

Expand Down

0 comments on commit 2d9627e

Please sign in to comment.