Skip to content

Commit

Permalink
Exported the 'IRange' interface of the 'Range' header parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed Aug 3, 2017
1 parent 2cbd559 commit 961f1e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions lib/server/v2/commands/Get.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
/// <reference types="node" />
import { HTTPRequestContext, HTTPMethod } from '../WebDAVRequest';
import { ResourceType } from '../../../manager/v2/fileSystem/CommonTypes';
export interface IRange {
min: number;
max: number;
}
export declare function parseRangeHeader(mimeType: string, size: number, range: string): {
ranges: IRange[];
separator: any;
len: number;
createMultipart: (range: IRange) => string;
endMultipart: () => string;
};
export default class implements HTTPMethod {
unchunked(ctx: HTTPRequestContext, data: Buffer, callback: () => void): void;
isValidFor(ctx: HTTPRequestContext, type: ResourceType): boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/server/v2/commands/Get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class RangedStream extends Transform
}
}

interface IRange
export interface IRange
{
min : number
max : number
Expand Down

0 comments on commit 961f1e7

Please sign in to comment.